Eye-start AF camera

ABSTRACT

An auto focus camera includes a focus detecting circuit, a lens driving circuit for driving a taking lens to an in-focus position based on a focus detection result, a starting signal outputting circuit for outputting a starting signal which starts a focusing operation, an operating member to be operated by a user after the starting signal is outputted, and a controlling circuit for controlling the lens driving circuit so as to drive the taking lens in manners different between before and after an operation of the operation member.

This application is a continuation of application Ser. No. 08/200,009,filed Feb. 22, 1994 now abandoned, which application is a continuationof application Ser.No. 07/885,615, filed May 19, 1992 now U.S. Pat. No.5,315,339.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a camera, and more specifically, to acamera having an auto focus (AF) function.

2. Description of the Prior Art

A function called continuous AF has conventionally been known.Continuous AF is a function of repeating an AF operation such as focusdetection and lens driving so that an in-focus condition is alwaysobtained with respect to a subject moving along the optical axis.

On the other hand, while photometry and an AF operation are started by ahalfway depression of a release button in conventional cameras, a camerahas recently been proposed where photometry and an AF operation arestarted prior to the halfway depression of the release button in orderto reduce time lag as much as possible. For example, a camera wherephotometry and an AF operation are started on it being sensed that auser is looking through the finder is proposed in Japanese laid-openPatent Application S64-42639.

In a camera of this type, since it is necessary to always obtain anin-focus condition during the whole time the user is looking through thefinder, it is desirable to perform the above-mentioned continuous AF. Inperforming continuous AF under a condition where in-focus condition hasbeen obtained, however, since variation in focus position whichvariation is caused as the subject moves is not so large, it isdesirable to give priority to causing the user to be unconscious of anAF operation over the operation speed of the continuous AF. That is, aquiet continuous AF is desirable which causes the user to be unconsciousof focusing.

On the contrary, if an AF operation is slowly performed on the user'slooking through the finder, an amount of time is required from when theuser starts to look through the finder to when an in-focus condition isobtained, which is inconvenient to the user. Moreover, it is requiredthat focusing be immediately performed just before a release operationis performed.

As described above, concerning the cameras having the continuous AFfunction, a camera is demanded where lens driving control can be changedaccording to the situation.

On the other hand, continuous AF has another problem. Generally,focusing is performed with respect to a subject located in apredetermined area called a focus area in conventional cameras. Withsuch an arrangement, when a main subject that the user intends tophotograph is located outside of the focus area, an in-focus conditionis obtained with respect to the background, not with respect to the mainsubject. Such a problem is also caused in performing a continuous AFoperation. Particularly, in a case where the main subject moves out ofthe focus area just before a release operation, the moment the mainsubject moves out, in-focus condition is obtained with respect to thebackground in the continuous AF. As a result, a photograph is takenwhere the main subject is out of focus.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a camera where lensdriving control can be varied according to the situation duringcontinuous AF.

Another object of the present invention is to provide a camera where,when there is a main subject with respect to which the user intends toobtain an in-focus condition, it can be prevented that the in-focuscondition is obtained with respect to the background during continuousAF even in a case where the main subject is located outside of the focusarea.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects and features of this invention will become clearfrom the following description taken in conjunction with the preferredembodiments with reference to the accompanied drawings in which:

FIG. 1 is a front overlooked view showing the appearance of a firstembodiment of the present invention;

FIG. 2 is a rear overlooked view showing the appearance of the firstembodiment of the present invention;

FIG. 3 is a front overlooked view of a grip portion of the firstembodiment of the present invention;

FIG. 4 is a circuit diagram of the first embodiment of the presentinvention;

FIG. 5 is a flow chart of a reset routine executed by an intra-bodymicrocomputer of the first embodiment of the present invention;

FIG. 6 is a flow chart of an AF lens moving-in subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 7 is a flow chart of a counter interrupt 11 subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 8 is a flow chart of a timer interrupt II subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 9 is a flow chart of an AF lens stop subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 10 is a flow chart of an eye sensing subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 11 is a flow chart of a timer interrupt III relating to the eyesensing subroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 12 is a flow chart of a timer interrupt I subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 13 is flow chart of a Ua flow of an S1ON subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 14 is flow chart of a V flow of the S1ON subroutine executed by theintra-body microcomputer the first embodiment of the present invention;

FIG. 15 is flow chart of a W flow of the S1ON subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 16 is a block diagram showing a main arrangement relating to AF anddisplay of the first embodiment of the present invention;

FIG. 17 shows a specific arrangement of a focus detecting portion of thefirst embodiment of the present invention;

FIG. 18 shows a condition of a photographing image plane of the firstembodiment of the present invention;

FIG. 19 shows a specific arrangement of line sensors provided on a CCDplate employed for the first embodiment of the present invention;

FIG. 20 shows finder displays of the first embodiment of the presentinvention;

FIG. 21 is a flow chart of a lens drive subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 22 is a flow chart of an exposure calculation executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 23 is a flow chart of an AF control subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 24 is a flow chart of an integration control subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 25 is a circuit diagram of a circuit, for executing an AF processin a double speed mode by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 26 is a timing chart in a normal speed mode of the first embodimentof the present invention;

FIG. 27 is a timing chart in the double speed mode of the firstembodiment of the present invention;

FIG. 28 is a flow chart of a double speed/normal speed determinationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 29 shows a flow of an algorithm executed by the intra-bodymicrocomputer of the first embodiment of the present invention;

FIG. 30 is a flow chart of a P flow of a defocus amount calculationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 31 is a flow chart of a Qa flow of the defocus amount calculationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 32 is a flow chart of an Ra flow of the defocus amount calculationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 33 is a flow chart of an Sa flow of the defocus amount calculationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 34 is a flow chart of a T flow of the defocus amount calculationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 35 is a flow chart of a main subject determination subroutineexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 36 is a flow chart of a panning detection interrupt subroutineexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 37 is a part of a flow chart of a moving subject determinationsubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 38 is a flow chart of a one-shot/continuous changeover subroutineexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 39 is a flow chart of an S1 triggered auto one-shot/continuoussubroutine executed by the intra-body microcomputer of the firstembodiment of the present invention;

FIG. 40 is a flow chart of a 0.5 sec auto one-shot/continuous subroutineexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 41 is a flow chart of an S1 auto one-shot/continuous subroutineexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 42 is a flow chart of an AF lens drive subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 43 is a flow chart of a drive speed limiting subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 44 is a flow chart of a drive amount setting subroutine executed bythe intra-body microcomputer of the first embodiment of the presentinvention;

FIG. 45 is a flow chart of a zoom control subroutine executed by theintra-body microcomputer of the first embodiment of the presentinvention;

FIG. 46 is a flow chart of an ASZ subject distance determinationexecuted by the intra-body microcomputer of the first embodiment of thepresent invention;

FIG. 47 shows displays provided within the finder and AF conditiondisplays provided out of the finder in an AF mode (where a wide area isselected) in the first embodiment of the present invention;

FIG. 48 shows displays provided within the finder and AF conditiondisplays provided out of the finder in a manual focus mode in the firstembodiment of the present invention;

FIG. 49 is a flow chart of an Rb flow, which is a variation of the Raflow (FIG. 32) of the first embodiment of the present invention,executed by the intra-body microcomputer of a second embodiment of thepresent invention;

FIG. 50 is a flow chart of an Sb flow, which is a variation of the Saflow (FIG. 33) of the first embodiment of the present invention,executed by the intra-body microcomputer of the second embodiment of thepresent invention;

FIG. 51 is a flow chart of a subroutine, which is a variation of theflow chart of the moving subject determination subroutine variation(FIG. 37) of the first embodiment of the present invention, executed bythe intra-body microcomputer of the second embodiment of the presentinvention;

FIG. 52 shows displays provided within the finder and AF conditiondisplays provided out of the finder in the AF mode (where the wide areais selected) in the second embodiment of the present invention;

FIG. 53 is a flow chart of an Sc flow, which is a variation of the Sbflow (FIG. 50) of the second embodiment of the present invention,executed by the intra-body microcomputer of a third emobidment of thepresent invention;

FIG. 54 is a flow chart of a Ub flow, which is a variation of the Uaflow (FIG. 13) of the first embodiment of the present invention,executed by the intra-body microcomputer of a fourth embodiment of thepresent invention;

FIG. 55 is a flow chart of a subroutine, which is a variation of theflow chart of the timer interrupt II (FIG. 8) of the first embodiment ofthe present invention, executed by the intra-body microcomputer of thefourth embodiment of the present invention;

FIGS. 56 and 57 show a flow chart of a subroutine, which is a variationof the flow chart of the integration control subroutine of FIG. 24 inthe first embodiment of the present invention, executed by theintra-body microcomputer of the fourth embodiment of the presentinvention;

FIG. 58 is a flow chart of a Qb flow, which is a variation of the Qaflow (FIG. 31) of the first embodiment of the present invention,executed by the intra-body microcomputer of the fourth embodiment of thepresent invention;

FIG. 59 is a flow chart of an Rc flow, which is a variation of the Rbflow (FIG. 49) of the second embodiment of the present invention,executed by the intra-body microcomputer of the fourth embodiment of thepresent invention;

FIG. 60 shows a photometry pattern on the photographing image plane ofthe first embodiment of the present invention;

FIG. 61 is a block diagram of a circuit of a camera of a fifthembodiment of the present invention;

FIG. 62A shows an arrangement of a camera body of the AF camera of thefifth embodiment of the present invention;

FIG. 62B shows an arrangement of a taking lens of the AF camera of thefifth embodiment of the present invention;

FIG. 63 shows an arrangement of distance measurement areas of the fifthembodiment of the present invention;

FIG. 64 is a block diagram of a circuit for deciding a multi algorithmof the fifth embodiment of the present invention;

FIG. 65 is a flow chart of a procedure for determining an algorithm ofthe fifth embodiment of the present invention;

FIG. 66 is a flow chart of a focus detection process executed in a casewhere a second island priority algorithm of the fifth embodiment of thepresent invention is selected;

FIG. 67 shows membership functions for selecting a suitable algorithmamong multi algorithms of the fifth embodiment of the present invention;

FIG. 68 shows specific rules, for selecting an algorithm, using themembership functions of FIG. 7;

FIG. 69 shows rules, for selecting a defocus amount, employed in a casewhere a macro algorithm of the fifth embodiment of the present inventionis selected; and

FIG. 70 shows a rule, for selecting a defocus amount, employed in a casewhere a central island priority algorithm of the fifth embodiment of thepresent invention is selected.

DESCRIPTION OF THE PREFERRED EMBODIMENT

As a first embodiment of the present invention, a single-lens reflexcamera system which is provided with a zoom lens system where a focallength can be varied by a motor will hereinafter be described withreference to the drawings.

FIG. 1 is a front overlooked view of a camera body BD embodying thepresent invention. FIG. 2 is a rear overlooked view of the camera bodyBD. FIG. 3 is an enlarged view of a grip portion GP of the camera bodyBD.

The name and function of each portion of the camera body BD will brieflybe described with reference to FIGS. 1 to 3. Switches will be describedlater together with the circuit arrangement which is shown in FIG. 4.

The numeral 111 is a slider for turning on and off asubsequently-described main switch SM (FIG. 4). The camera body BD isunder an operable condition when the slider 111 is placed at ONposition, and is under an inoperable condition when the slider 111 isplaced at OFF position. The numeral 113 is a flash emitting portion.

The numeral 112 is a release button. By depressing the release button112 halfway, a subsequently-described photographing preparation switchS1 is turned on to start a photometry, an exposure calculation and an AFoperations. Moreover, by depressing the release button 112 all the waydown, a subsequently-described release switch S2 is turned on to startan exposure control operation.

The numeral 114 is a body display portion for displaying a shutter speedand an aperture value.

The numeral 16 is an AF/MF changeover switch for changing over betweenAF and MF (manual focusing).

The numeral 17 is a light emitting window for emitting auxiliary light.Inside thereof, au auxiliary light emitting portion is arranged.

The numeral 118 is an AF area changing switch which is operated in orderto change AF areas (distance measurement areas).

The numeral 19 which is provided to the lens LE is a zoom ring. Asubsequently-described motor is driven in accordance with the rotationof the zoom ring and the direction of the rotation thereof to move alens in a wide direction (shorter focal length direction) or in atelephoto direction (longer focal length direction).

The numeral 20 is an LED (light emitting diode) which serves as a lightemitting portion. The numeral 21 is an SPC (silicon photocell) whichserves as a light receiving portion. By the LED 20 and the SPC 21,whether a user is looking through the finder or not is sensed (thissensing will hereinafter be referred to as "eye sensing"). That is, alight beam emitted by the LED 20 reflected by the user who is lookingthrough the finder, and the reflected light beam is received by the SPC21 to perform the eye sensing.

An external cover 23 of the grip portion GP of FIG. 3 is made of elasticrubber. Inside of the grip portion GP, conductive patterns 22a and 22bwhich are insulated from each other are provided. Between the cover 23and the conductive patterns 22a and 22b, conductive rubber (not shown)is arranged. By pressing the external cover 23 of the grip portion GP,the conductive patterns 22a and 22b are enabled through the conductiverubber. With this arrangement, the grip portion GP functions as a switch(hereinafter referred to as "grip switch").

Subsequently, a circuit arrangement of the camera body BD will bedescribed.

FIG. 4 is a circuit diagram of an intra-body circuit which isincorporated the camera body BD. First, the intra-body circuit will bedescribed with reference to the figure.

μC1 is an intra-body microcomputer which controls the entire camerasystem and performs various calculations.

AFCT is a focus detection light receiving circuit, which is providedwith: a CCD (charge coupled device) which serves as a focus detectionsensor for accumulating an optical charge for a predetermined period oftime; a circuit for driving the CCD; and a circuit for processing andA/D-(analog to digital) converting an output of the CCD to provide (datadump) it to the intra-body microcomputer μC1. The focus detection lightreceiving circuit AFCT is connected to the intra-body microcomputer μC1through a data bus. Information on a defocus amount of a subject whichis located in a distance measurement area is obtained through the focusdetection light receiving circuit AFCT.

LM is a photometry circuit which is provided on the finder optical path.A photometry value thereof is A/D-converted and provided to theintra-body microcomputer μC1 as luminance information.

DX is a film sensitivity reading circuit for reading a data, on filmsensitivity, which is provided to a film holder to serially output themto the intra-body microcomputer μC1.

DISPC is a display circuit for inputting a display data and a displaycontrol signal from the intra-body microcomputer μC1 to cause thefollowing display portions to form a predetermined display character: adisplay portion DISPI (the display portion 114 of FIGS. 1 and 2) whichis provided on the upper surface of the camera body BD; a displayportion DISPII, of a transmission type liquid crystal, which is arrangedin parallel with a focusing screen (not shown) and whose displaycharacter is viewed within an image plane consisting of images madethrough the lens; and a display portion DISPIII whose display characteris viewed outside of a finder image plane.

EPD is an eye sensing circuit for performing eye sensing by use of theLED 20 and the SPC 21.

M1 is an AF motor for driving an AF lens provided in the lens LE (FIGS.1 and 2) as a focusing lens for AF through an AF mechanism (not shown).

MD1 is a motor drive circuit for driving the AF motor M1 based on focusdetection information. A normal or a reverse rotation and stoppingthereof is controlled by an instruction from the intra-bodymicrocomputer μC1.

ENC is an encoder for monitoring a rotation of the AF motor M1. Theencoder ENC outputs a pulse to a counter input terminal CNT of theintra-body microcomputer μC1 every predetermined rotation angle. Theintra-body microcomputer μC1 counts the pulse, detects a moving-outamount from infinity to the current lens position, and calculates aphotographing distance (or a subject distance) of a subject from themoving-out amount (moving-out pulse count CT).

TVCT is a shutter control circuit for controlling a shutter in responseto a control signal from the intra-body microcomputer μC1.

AVCT is an aperture control circuit for controlling an aperture inresponse to control signal from the intra-body microcomputer μC1.

M2 is a motor for winding and rewinding film and charging an exposurecontrol mechanism. MD2 is a motor drive circuit for driving the motor M2based on an instruction from the intra-body microcomputer μC1.

M3 is a motor for driving a mechanism (not shown) and driving a part orthe whole of the lens system to perform a zooming operation. MD3 is amotor drive circuit for driving the motor M3 based on an instructionfrom the intra-body microcomputer μC1.

ZENC is an encoder for detecting a focal length. The zoom lens LE has afocal length range of between 35 mm to 400 mm.

AUXLE is an auxiliary light emitting circuit for emitting an auxiliarylight in response to an auxiliary light emission signal from theintra-body in an microcomputer μC1 in an auxiliary light mode. Theauxiliary light mode is a mode where light is irradiated to a subject inorder to obtain a subject image required for AF when the subject is oflow luminance and of low contrast. FL is a flash control portion forflash emission and flash charging.

Subsequently, an arrangement relating to the power source will bedescribed.

E1 is a battery which serves as the power source of the camera body BD.

Tr1 is a first power supply transistor for supplying power to a part ofthe above-described circuit.

DD is a DC/DC (direct current/direct current) converter for stabilizinga voltage VDD which is to be supplied to the intra-body microcomputerμCl. The DC/DC converter DD operates when a power control terminal PW0is of high level.

VDD is an operation power voltage for the intra-body microcomputer μC1,the film sensitivity reading circuit DX and the display control circuitDISPC.

VCC1 is an operation power voltage for the focus detection lightreceiving circuit AFCT and the photometry circuit LM. The voltage VCC1is supplied from the battery E1 through the power supply transistor Tr1under control of signal which is outputted from a power control terminalPW1.

VCC0 is an operation power voltage for the eye sensing circuit EPD, themotor drive circuit MD1, the shutter control circuit TVCT, the aperturecontrol circuit AVCT and the motor drive circuits MD2 and MD3. Thevoltage VCC0 is supplied directly from the battery E1.

D1 to D3 are diodes for, in order to reduce power consumption, providinga voltage lower than the voltage VDD to the intra-body microcomputer μC1when the DC/DC converter DD halts its operation. The lower voltage isset to a minimum power supply voltage at which the intra-bodymicrocomputer μC1 can operate. When the DC/DC converter DD halts itsoperation, only the intra-body microcomputer μC1 can be operated.

Subsequently, switches will be described. In FIG. 4, IP1 to IP9 areterminals, of the intra-body microcomputer μC1, through which theintra-body microcomputer μC1 is connected to respective switches.

SAF is a normally-open push switch for changing AF areas to besubsequently described. The switch SAF is turned on when thepreviously-described AF area changing switch 118 is depressed.

SGR is a grip switch which is turned on when the grip portion GP isgripped.

PG2 is a one-shot circuit which generates a pulse when the grip switchSGR is turned on.

S1 is a photographing preparation switch which is turned on bydepressing the release button 112 halfway. When the switch S1 is turnedon or when the above-mentioned grip switch SGR is turned on, aninterrupt signal is inputted to an interrupt terminal INT1 of theintra-body microcomputer μC1 to perform preparation operations (such asa photometry, a distance measurement and an AF operation) required forphotographing.

SM is a main switch which is ON when the slider 11 for enabling theoperation of the camera is placed at ON position and which is OFF whenthe slider 11 is placed at OFF position.

PG1 is a pulse generator which outputs a low-level pulse every time theswitch SM is turned from ON to OFF or from OFF to ON. An output of thepulse generator PG1 is inputted to an interrupt terminal INT2 of theintra-body microcomputer μC1 as an interrupt signal.

SZU and SZD are switches which are turned on and off by rotating thezoom ring 19 to the left or to the right. Zooming up is performed by theturning on of the switch SZU, while zooming down is performed by theturning on of the switch SZD.

S2 is a release switch which is turned on by depressing the releasebutton 112 all the way down. When the switch S2 is turned on, aphotographing operation is performed.

S3 is a mirror-up completion detecting switch which is turned on when amirror (not shown) is brought up to a predetermined position during arelease operation.

SAF/M is a changeover switch for changing over between AF and MF.

SRE1 is a battery attachment detecting switch which is turned off whenthe battery E1 is attached to the camera body BD. When the battery E1 isattached and the battery attachment detecting switch SRE1 is turned off,a capacitor C1 is charged through a resistor R1 so that the level of areset terminal RE1 of the intra-body microcomputer μC1 is changed fromlow to high. Thereby, the intra-body microcomputer μC1 executes asubsequently-described reset routine.

Subsequently, an arrangement for serial data communication will bedescribed.

The photometry circuit LM, the film sensitivity reading circuit DX andthe display control circuit DISPC perform serial data communication withthe intra-body microcomputer μC1 through a serial input SIN, a serialoutput SOUT and a serial SCK, respectively.

The communication partner with the intra-body microcompurer μC1 isselected based on the levels of chip select terminals CSLM, CSDX andCDSDISP. That is, the photometrry circuit LM is selected when the levelof the terminal CSLM is low; the film sensitivity reading circuit DX isselected when the level of the terminal CSDX is low; and the displaycontrol circuit DISPC is selected when the level of the terminal CSDISPis low.

Subsequently, software will be described.

First, software of the intra-body microcomputer μC1 will be described.

When the battery E1 is attached to the camera body BD, in the intra-bodycircuit shown in FIG. 4, the battery attachment detecting switch SRE1 isturned off, the reset capacitor C1 is charged through the resistor R1,and a reset signal whose level is changed from low to high is inputtedto the reset terminal RE1 of the intra-body microcomputer μC1 whichcontrols the entire camera. By the inputting of the reset signal, theintra-body microcomputer μC1 starts to generate a clock by use ofhardware incorporated therein, activates the DC/DC converter DD and issupplied with the voltage VDD at which the intra-body microcomputer μC1can operate to execute a reset routine which is shown in FIG. 5.

Under a subsequently-described sleep condition (halt condition), theintra-body microcomputer μC1 halts the clock generation, and the DC/DCconverter DD halts its operation. In an operation which is started by aninterrupt applied under the sleep condition, similarly at the attachmentof the battery E1, the clock generation and the operation of the DC/DCconverter DD are started by the hardware which is incorporated in theintra-body microcomputer μC1.

In the reset routine of FIG. 5, first, all the interrupts are inhibited(step #5), and ports and registers are reset (step #10). Then, at step#20, whether the main switch SM is ON or not is determined. Moreover,when the main switch SM is turned from on to off or from off to on, aninterrupt SMINT by the operation of the main switch SM is applied andexecuted from step #20.

When it is determined that the main switch SM is ON at step #20, all theinterrupts are permitted (step #25), and the level of the output portPW1 which is a power source control terminal is set to high in order toenable the transistor Tr1 for supplying power to each circuit (step#35).

Then, at step #40, an AF lens moving-in subroutine is executed. Thesubroutine is shown in FIG. 6.

When the AF lens moving-in subroutine is called, first, a counter N1 forindicating a drive amount is set to 0 (step #150), and a speed limitLDVmax is set to 16V1 (16 times the V1) (step #151). Then, the value ofa counter ND for indicating a drive amount of the AF lens for focusingis set to -NLG (a negative value with a high absolute value) (step#152), and a lens drive subroutine for the AF lens is executed (step#155).

The lens drive subroutine is shown in FIG. 21.

When the lens drive subroutine is called, whether the sign of the lensdrive amount ND is plus or not (whether the first bit is 1 or not) isdetermined (step #1197). Determining that the drive direction of thelens is a near direction when the sign is plus and that the drivedirection is an infinity direction when the sign is not plus, signalsrepresentative of respective directions are outputted to the motor drivecircuit MD1 (steps #1198 and #1199). Then, a flag LMVF showing that thelens is being moved is set (step #1200), and the process returns.

In this embodiment, the driving of the AF lens is controlled by acounter interrupt II and a timer interrupt II.

The counter interrupt II is applied when a pulse showing the driving ofthe AF lens is inputted from the encoder ENC (FIG. 4), while the timerinterrupt II is applied when no counter interrupt II is applied within apredetermined period of time after the first counter interrupt II wasapplied. It is detected by the timer interrupt II that the lens is movedto the end (an infinity position or a nearest position). That is, if thedrive amount ND is set to a value with a high absolute value like atstep #152 of FIG. 6, the lens is always moved to the end without beingstopped on the way, and by the timer interrupt II which is appliedthereafter, it is detected that the lens is moved to the end.

The routines of the counter interrupt II and the timer interrupt lI areshown in FIGS. 7 and 8, respectively.

First, the routine of the counter interrupt II will be described.

When a pulse is inputted from the encoder ENC, the counter interrupt IIis applied, and the routine of the counter interrupt II shown in FIG. 7is executed.

At step #250, the count value N1 indicating a driven amount (rotationnumber of the motor) of the AF lens is set to N1+1. At step #255, N1 issubtracted from the drive amount ND to obtain a remaining drive amount(remaining rotation number) ΔN.

At step #260, whether a subsequently-described eye sensing mode is ON ornot is determined.

The eye sensing mode is a process which is executed when the eye sensingcircuit EPD detects that the user grasps the grip without depressing therelease switch halfway (the condition where the release switch S1 isdepressed halfway will hereinafter be referred to as "S1ON") and looksthrough the finder. In this operation, S1ON flows (that is, AF and AE(automatic exposure) flows under the S1ON condition) are executed. In anAF operation of the eye sensing mode, however, the maximum speed of thelens drive is lower than in an AF operation of the S1ON condition. Otheroperations of the eye sensing mode are also different from those of theS1ON condition.

When the eye sensing mode is ON (EPF=1), whether a moving subject modeis ON (AFM=3) or not is determined (step #261). When the moving subjectmode is not ON, an AF lens drive speed LDV is obtained from the drivenamount N1 and the remaining drive amount ΔN of the lens according toTable 2 (TA3) (step #265). When the moving subject mode is ON, the AFlens drive speed LDV is obtained from the driven amount N1 and theremaining drive amount ΔN of the lens according to Table 2 (TA34) (step#263). Then, the process proceeds to step #275.

When the eye sensing mode is not ON (EPF=0), the AF lens drive speed LDVis obtained from the driven amount N1 and the remaining drive amount ΔNof the lens according to Table 2 (TA4) (step #270). Then, the processproceeds to step #275.

A starting speed of the lens at the activation is controlled by thedriven amount N1. In order to stop the lens, the speed of the lens iscontrolled by the remaining drive amount ΔN. The speed V1 is set as thereference speed. The AF lens drive speed LDV is represented by amultiple of the speed V1.

Then, at step #275, whether the drive speed LDV is higher than the speedlimit LDVmax or not is determined. When it is higher, the drive speedLDV is set as a new speed limit LDVmax (step #280), and the processproceeds to step #285. When it is not higher, the process proceedsdirectly to step #285.

At step #285, the lens is controlled so as to be moved at the speed LDVwhich is set at the above-mentioned steps. The method of controlling thespeed of the lens will not be described since it is irrelevant to thisembodiment.

Then, at step #290, whether or not the remaining drive amount ΔN is 0 orsmaller is determined. When it is 0 or smaller, the AF lens is stopped(step #292), an end detecting timer T1 is reset and started (step #295),and the process returns. Otherwise, the process proceeds to step #295without stopping the AF lens, and returns.

The lens drive speed is lower in the eye sensing mode than in othermodes. Moreover, in the eye sensing mode, the lens drive speed is higherwhen the subject is moving than when the subject is stationary. Thesewill be described later.

Subsequently, the routine of the timer interrupt II will be described.

When the value of the timer T1 which is reset and started in theabove-described routine of the counter interrupt II (step #295 of FIG.7) reaches a predetermined value, the routine of the timer interrupt IIshown in FIG. 8 is executed. That is, determining that the AF lens ismoved to the end (the infinity position or the nearest position), an AFlens stop subroutine is executed (step #300), and a flag LEEDF showingthat the process has passed through the AF lens stop subroutine is set(#305).

The AF lens stop subroutine which is called at steps #292 and #300 isshown in FIG. 9.

When the subroutine is called, first, a control signal for shorting bothterminals of the AF motor M1 is outputted to the motor drive circuit MD1for 10 msec in order to stop the AF motor M1 (step #350).

Then, a control signal for disabling the AF motor M1 is outputted to themotor drive circuit MD1 (step #355), and the flag LMVF showing that thelens is being moved is reset (LMVF=0, step #356). Then, the processreturns.

Returning to the flow chart of FIG. 8, whether or not a flag LCSFshowing a low contrast scanning mode has been set is determined at step#307. The low contrast scanning is to repeat a focus detection (distancemeasurement) while driving the AF lens when focus detection isimpossible because of insufficient contrast. The low contrast scanningmode is mode where the low contrast scanning is performed.

When the flag LCSF has been set (LCSF=1), that is, when the low contrastmode is ON, the process proceeds to step #310, where whether the lensdrive mode is a moving-out mode or not is determined. The moving-outmode is a mode where the AF lens is moved out, while a moving-in mode isa mode where the AF lens is moved in.

When the mode is the moving-out mode (FLDF=1) at step #310, a flag FLDFis reset (FLDF=0) at step #315, and the drive amount ND is set to -NLGat step #320. Then, after a lens drive routine (FIG. 21) is executed atstep #325, the process returns.

When the mode is not the moving-out mode (FLDF=0), that is, when themode is the moving-in mode, determining that focus detection cannot beperformed even through both the moving-out operation and the moving-inoperation are performed, a flag LCEF is set (LCEF=1) at step #330 inorder to show that focus detection is impossible. Then, after the timerinterrupt II is inhibited at step #335, the process returns. Theinhibition of the timer interrupt II prevents the flow from beingexecuted again after a predetermined process is completed (although thetimer is operating).

When the flag LCSF showing the low contrast scanning mode has not beenset (LCSF=0), at step #307, the process proceeds to step #335, where thetimer interrupt is inhibited. Then, the process returns.

Returning to the flow chart of FIG. 6, when the process returns from theabove-described lens drive subroutine (FIG. 21), the timer interrupt IIis permitted (step #160), and the process waits until the flag LEEDFshowing that the lens has been moved to the end is set (LEEDF=1, step#165).

Since the drive amount ND is set to -NLG which is a negative value witha high absolute value at step #152, it never occurs that ΔN becomes 0due to the counter interrupt II before the lens is moved to the end.Therefore, the lens is never stopped on the way. That is, by setting NDto -NLG, the lens is always moved to the end without being stopped onthe way, and the flag LEEDF is set in the interrupt routine for thetimer interrupt II which is applied thereafter. When it is detected thatthe flag LEEDF has been set at step #165, the process proceeds to step#170. Then, determining that the lens has been moved to the infinityposition, a counter for counting a moving-out amount NF, of the lens,from the infinity ty position is reset (step #170), the flag LEEDF isreset (step #175), and the process returns.

Returning to the flow chart of FIG. 5, when the process returns from theabove-described AF lens moving-in subroutine (FIG. 6), the processproceeds to step #50, where whether the photographing preparation switchS1 is ON or not is determined.

When the photographing preparation switch S1 is not ON, the processproceeds to step #62, where a subsequently-described eye sensingsubroutine is executed. Thereafter, the process proceeds to step #73 towait until an interrupt is applied.

The eye sensing subroutine and a timer interrupt III relating theretowill be described with reference to FIGS. 10 and 11, respectively.

As shown in FIG. 10, when the eye sensing subroutine is called, first,whether the grip switch SGR is ON or not is determined (step #200).

When the grip switch SGR is not ON, a timer interrupt I is inhibited(step #235), a flag S1ONF is reset which is set when the photographingpreparation switch S1 is ON or when five minutes have not passed sincethe turning off of the photographing preparation switch S1 (S1ONF=0,step #236), a flag EPF showing that the eye sensing mode is reset(EPF=0, step #237), and the process returns.

When the grip switch SGR is ON, a signal representative of the start oflight emission is outputted to the eye sensing detecting circuit EPD(step #205). Thereby, the eye sensing detecting circuit EPD emits aninfrared ray through the LED 20. Thereafter, the timer interrupt III ofa timer TIII which waits 50 msec until an infrared ray detecting circuitis stabilized is permitted (step #210). Then, the timer TIII is resetand started (step #215), and the process returns.

When 50 msec have passed, the timer interrupt III shown in FIG. 11 isexecuted.

First, at step #216, the timer interrupt III is inhibited. At step #217,the timer interrupt I for eye sensing is permitted. At step #218, atimer TINT for the timer interrupt I is reset and started.

Then, at step #220, whether or not it has been sensed that the user islooking through the finder is determined based on a sensing signal whichis inputted from the eye sensing detecting circuit EPD.

When it is sensed that the user is looking through the finder, the flagEPF showing it is set (EPF=1) at step #222, and at step #224, whether ornot the flag S1ONF showing that the S1ON subroutine is being executedhas been set is determined. When it has been set, the process returns.When it has not been set, the process proceeds to step #55 (FIG. 5) inorder to execute the S1ON subroutine (step #226).

When it is not sensed that the user is looking through the finder atstep #220, the flag EPF showing that it is sensed that the user has beenlooking through the finder is reset (EPF=0) at step #228, and theprocess returns.

The timer interrupt I is applied every 250 msec. When the interrupt isapplied, after the eye sensing subroutine (FIG. 10) is executed at step#240 as shown in FIG. 12, the process returns.

Returning to the flow chart of FIG. 5, a case where it is determinedthat the photographing preparation switch S1 is ON at step #50 will bedescribed.

In this case, the process proceeds to step #55 to execute the S1ONsubroutine. Then, at step #60, whether or not the flag S1ONF which isset when the photographing preparation switch S1 is ON or when fiveminutes have not passed since the turning off of the photographingpreparation switch S1 has been set or not is determined.

When the flag S1ONF has been set (S1ONF=1), the process returns to step#55, and the S1ON subroutine is repeated until the flag S1ON is reset.

When the flag S1ONF has not been set (S1ON=0), the process proceeds tostep #65, where the level of the power control terminal PW1 is set tolow in order to disable the power supply transistor Tr1. Then, at step#70, the level of the power control terminal PW0 is set to low in orderto stop the operation of the DC/DC converter DD, and at step #73, theprocess waits until an interrupt is applied.

When the grip switch SGR or the photographing preparation switch S1 isturned from off to on, an interrupt S1INT is applied, and the processstarts from step #50.

The above-mentioned S1ON subroutine is shown in FIGS. 13 to 15. The S1ONsubroutine consists of a Ua flow (FIG. 13), a V flow (FIG. 14) and a Wflow (FIG. 15).

When the subroutine is called, first, whether or not the flag S1ONFshowing that the S1ON subroutine has been executed is determined (step#500).

When the flag S1ON has not been set (S1ONF=0), the flag S1ON is set(S1ONF=1) at step #501. Then, a timer TAF for an AF operation is resetand started (step #501-1), an interrupt TEPINT for detecting a blur ispermitted (step #501-2), a timer TEP for the interrupt TEPINT is resetand started (step #501-3), a variable NAF for counting the number oftimes of focus detection is reset (NAF=0, step #501-4), and a flag MSFshowing that a main subject determination mode (see the subroutine ofFIG. 35) executed is set (MSF-1, step #501-5).

Then, a flag INFF showing that the in-focus condition has been obtainedis reset (INFF=0, step #501-6), a flag S1INFF showing that the in-focuscondition has been obtained after the photographing preparation switchS1 was turned on is reset (S1INFF=0, step #501-7), and a flag EP1Fshowing a first-time lens drive in the eye sensing mode is reset(EP1F=0, step #501-8).

Then, an AF mode is set to "2" which represents the indetermination mode(AFM=2, step #501-9), and a flag ASZF for performing asubsequently-described auto stand-by zoom is set (ASZF=1, step #501-10).Then, after a flag S1OFF showing that the switch S1 has been turned fromon to off is reset (S1OFF=0, step #501-11), the process proceeds to step#502. When the S1ONF has been set at step #500, the process proceedsdirectly to step #502.

In the AF mode (see a moving subject determination routine of FIG. 37),AFM=1 represents an AF lock (the subject is stationary), AFM=2represents that whether the subject is stationary or moving isindeterminate, and AFM=3 represents the subject is moving.

At step #502, whether or not the AF area changing switch SAF has beenturned from off to on is determined.

When it has been turned from off to on, the AF area is alternatelychanged over between "wide" (mode 1: AFARM=1) and "spot" (mode 2:AFARM=2) (step #503). Then, the process proceeds to step #590 to controla display (step #503-1).

When the AF area changing switch SAF has not been turned from off to on,the process proceeds to step #504.

At step #504, whether the photographing preparation switch S1 is ON ornot is determined.

When the switch S1 is ON, the timer interrupt I is inhibited at step#503, the flag EPF showing that it has been sensed that the user islooking through the finder is reset (EPF=0 ) at step #505-1. Then, theprocess proceeds to step #506 of the V flow (FIG. 14).

When the switch S1 is not ON, whether the switch S1 has been turned fromon to off is determined at step #504-1.

When the switch S1 has been turned from on to off, the process proceedsto step #504-2, where the eye sensing is performed. Thereafter, the AFmode when the switch S1 is turned on is determined (step #504-4). Whenthe AF mode is the moving subject mode, AFM is maintained AFM=3 tocontinue the moving subject mode (step #504-5). When the AF mode is notthe moving subject mode, at step #504-3, the AF mode is set to "2" whichrepresents the indetermination mode (AFM=2) in order to reset the AFmode which is set under the S1ON condition. Then, after the flag S1OFFshowing that the switch S1 has been turned from on to off is set (step#504-6), the process proceeds to step #506.

When the switch S1 has not been turned from on to off (that is, theswitch S1 is currently OFF), the process proceeds directly to step #506.

At step #506, the interrupt S1IlNT is inhibited. Thereafter, at step#510, the level of the power terminal PW1 is set to high in order toenable the power supply transistor Tr1.

Then, at step #532, whether or not the flag EPF showing that the user islooking through the finder has been set is determined.

When the flag EPF has been set (EPF=1), the process proceeds to step#540, where a subroutine for AF control is executed.

When the flag EPF has not been set (EPF=0), whether the photographingpreparation switch S1 is ON or not is determined at step #535.

When the photographing preparation switch S1 is ON, the process proceedsto step #540, where the AF control subroutine (controlling of anautomatic focusing operation) is executed. Thereafter, the processproceeds to step #542, where a zoom control subroutine is executed. Acase where the photographing preparation switch S1 is not ON will bedescribed later.

Subsequently, AF control and display (area display within an image planeand in-focus display) will be described.

First, an arrangement relating to AF and display will be described withreference to the block diagram of FIG. 16.

In the figure, a light beam which is incident through a taking lens 9 isreflected by a finder mirror 4. Then, after being incident on apentaprism 1 through a focusing screen 3 and a transmission type liquidcrystal display (LCD) 2, the light beam passes through a finder lens 18to be incident on the eye of the user as an image.

Of the light beams which are incident on the finder mirror 4, a part oflight beams which is required for focus detection passes through themirror 4 and is incident on a focus detecting portion 8 by a sub mirror5. A focus detecting portion 8 is provided with an optical system whichis required for focus detection, and includes a sensor and a dataoutputting portion. A data which is outputted from the focus detectingportion 8 is inputted to a control circuit 7. Based on the inputteddata, the control circuit 7 outputs data for controlling a focusdetecting sensor, sequence and an LCD drive circuit 6. The LCD drivecircuit 6 controls the transmission type LCD 2 based on the control dataoutputted from the control circuit 7 to provide various liquid crystaldisplays.

FIG. 17 shows a specific arrangement of the focus detecting portion ofFIG. 16.

In the figure, a light beams reflected by the sub mirror 5 of FIG. 16 isdivided into four luminous fluxes by an image re-forming lens 12 througha condenser lens 14. The luminous fluxes are formed into images on a CCDplate 11.

In this embodiment, the conventionally-known phase difference detectingmethod is employed as an AF method. An aperture mask 13 is set so as tooverlap the image re-forming lens 12. Unnecessary light beams comingfrom the condenser lens 14 are cut by openings of the aperture mask 13.On the CCD plate 11, line sensor pairs 11-a, 11-b, 11-c and 11-d areformed in correspondence with subsequently-described four focusdetection (distance measurement) areas a, b, c and d.

FIG. 18 shows a condition of a photographing image plane of a camera ofthis embodiment.

In the figure, the distance measurement areas a, b, c and d respectivelycorresponding to the line sensors 11-a, 11-b, 11-c and 11-d which areformed on the CCD plate 11 of FIG. 17 are shown within the photographingimage plane 15.

FIG. 19 shows a specific arrangement of the line sensors 11-a to 11-d ofthe CCD plate 11 shown in FIG. 17.

In the figure, 1-1, 2-1, 3-1 and 4-1 are reference portions, while 1-2,2-2, 3-2 and 4-2 are comparison portions. The reference portions 1-1,2-1, 3-1 and 4-1 associate with the comparison portions 1-2, 2-2, 3-2and 4-2, respetively. Focus detection is performed by comparing an imageof the reference portion with an of image the comparison portion whileshifting the image of the reference portion.

FIG. 20 shows all the finder displays.

In the figure, a display 31 is a distance measurement frame under a widecondition (mode I), while a display 32 is a distance measurement frameunder a spot condition (mode II). Dotted lines show portionscorresponding to the distance measurement areas of FIG. 18, and are notpractically displayed in the finder. Displays 32 to 35 are provided whena subject viewed through each distance measurement frame is locatedwithin a depth of field during an MF operation. A display 36 is turnedon, off and blinks to show that the subject is in-focus, that thesubject is out of focus, that the subject is moving, and that focusdetection is impossible.

As described above, various display functions are provided in thefinder. Thereby, the user can correctly understand the photographingcondition, and the camera becomes more convenient.

The previously-mentioned AF control subroutine is shown in FIG. 23.

The AF control consists of three operations: integration control (step#1300); an algorithm for calculating a defocus amount based on a CCDdata obtained after the integration is completed and for determiningwhether a subject is moving or stationary (step #1305); and AF lensdrive which is based on the defocus amount obtained as a result of thealgorithm (step #1310).

The above three will subsequently be described.

A flow for the integration control is shown in FIG. 24.

First, at step #1350, double speed/normal speed determination is made.Now, the double speed/normal speed will hereinafter be described.

When a high-speed AF process is required, an AF system where data dumprequires a long time is inappropriate. For this reason, with respect toan output (OS terminal) from the CCD of FIG. 25, the speed of each oftransfer clocks φ1 and φ2 is increased, as shown in FIG. 27, to a speeddouble the normal speed (FIG. 26), and a shift gate signal S/H isoutputted every time two dots of image are outputted. Therefore, a dataon two dots of image is added as a data on one dot of image in ahardware manner and outputted, and an AGC (auto gain control) is causedto halve the doubled output of the CCD. Thereby, the data becomesapparently equivalent to the data on the half number of dots of image,so that the data dump time is reduced to half the normal time. A doublespeed mode is a mode where the above-described operation is performed.

RS is a reset terminal for resetting the capacitor C1. ADS of FIGS. 26and 27 shows timing of A/D conversion by an A/D converter which is notshown.

The above control (control of the clocks φ1 and φ2, the signal S/H andan amplifier) is performed by a signal from the intra-body microcomputerμC1.

A double speed/normal speed determination subroutine shown in FIG. 28will be described.

First, at step #1400, the AGC is set to 1. At step #1405, whether thecurrent AF operation is a first-time AF operation or not is determined.

When it is a first-time AF operation (NAF=0), since a high-speed AFprocess is more required than data accuracy, the process proceeds step#1430 to set the double speed mode. The AGC is reduced to 1/2 at step#1430, the double speed mode (clock) is set at step #1435, and an AGCdata and double speed/normal speed data are outputted (steps #1440 and#1445). Then, the process returns.

When the current AF operation is not a first-time AF operation (NAF≠0),the process proceeds to step #1410, where the eye sensing mode is ON ornot is determined (step #I410).

When the eye sensing mode is ON (EPF=1), whether the main subjectdetermination mode is ON or not is determined at step #1415. When themain subject determination mode is ON (MSF=1), the process proceeds tostep #1430 to set the double speed mode. The reasons why the double modeis set are that a high-speed AF process is also more required than AFaccuracy in the main subject determination mode and that focusing isfinally performed in a normal speed mode.

When the eye sensing mode is not ON (EPF=0) at step #1410, or when themain subject determination mode is not ON (MSF=0) at step #1415, theprocess proceeds to step #1420, where whether the auxiliary light modeis ON or not is determined.

When the auxiliary light mode is ON (ALMF=1), whether a changeover ofthe AGC is necessary or not is determined at step #1425.

When a changeover of the AGC is not necessary (AGCCHF=0), the processproceeds to step #1430 to set the normal double speed mode. When achangeover of the AGC is necessary (AGCCHF=1), the process proceeds tostep #1435 while the AGC is maintained intact. The reason why the doublespeed mode is set in the auxiliary light mode is that the double speedmode where outputs of two devices are added is advantageous to thelow-frequency subjects. It should be noted that the auxiliary light modeis set when many of the subjects are of low contrast, and many of thelow-contrast subjects are of low-frequency with respect to an imagesignal thereof. When the AGC is set to "1" (AGCCHF=1), the processingcapability for a low-contrast subject is improved by setting the AGC notto 1/2 but to 1 when a subject is dark and an output of the CCD is smallunder a condition where the integration time is limited to 80 msec.

When the auxiliary light mode is not ON at step #1420 (ALMF≠1), theprocess proceeds to step #1450, where whether zooming is being performedor not is determined.

When zooming is being performed (ZMVF=1), the process proceeds to step#1430 to set the double speed mode in order to increase the speed of AFprocess.

The reason why the speed of AF process is increased during zooming isthat the size of a subject image is varied on an image plane (filmsurface). That is, the double speed mode is set in order to swiftlyfollow the variation of the subject image size. Moreover, in a casewhere a varifocal lens is employed, the reason why the speed isincreased is that a high-speed process is required since an image isshifted along the optical axis.

When zooming is not being performed (ZMFV≠1) at step #1450, the processproceeds to step #1455, where the low contrast scanning is beingperformed or not is determined.

When the low contrast scanning is being performed (LCSF=1), a high-speedprocess is required since an image is varied during integration byperforming focus detection while moving the lens. Therefore, the processproceeds to step #1430 to set the double speed mode.

When the low contrast scanning is not being performed (LCSF≠1), thenormal speed mode is set at step #1460. The AGC data and the doublespeed or normal speed data are outputted (steps #1440 and #1445). Then,the process returns.

Returning to the integration control flow of FIG. 24, when the doublespeed/normal speed determination routine has been completed at step#1350, whether the auxiliary light mode is ON or not is determined atstep #1355.

When the auxiliary light mode is ON (ALMF=1), the auxiliary lightemission signal is transferred to the auxiliary light emitting circuitAUXLE to emit auxiliary light (step #1360). Then, the process proceedsto step #1365.

When the auxiliary light mode is not ON (ALMF≠1), the process proceedsdirectly to step #1365.

At step #1365, an integration starting signal is outputted to the AFcircuit AFCT to start integration. Then, at step #1370, asubsequently-described timer TAF which is used in an AF operation isreset and started. Then, whether an integration completion signal isinputted from the AF circuit AFCT or not is determined at step #1375.And whether the integration time is 80 msec or not (TAF=80 msec) aredetermined at step #1380. On detecting any of them, the intra-bodymicrocomputer μC1 outputs the integration completion signal to the AFcircuit AFCT to finish the integration (step #1385).

Then, at step #1390, the value of the timer TAF is stored as TAF1. Atstep #1392, the emission of auxiliary light is stopped. At step #1395, adata reading signal is transferred to an integration circuit and thedata is inputted into the intra-body microcomputer μC1.

Various methods of controlling integration are available. In thisembodiment, however, the description thereof will be omitted since theyare irrelevant to the present invention.

Returning to FIG. 23, when the integration control of step #1300 iscompleted, an algorithm routine of step #1305 is executed. A flow of thealgorithm shown in FIG. 29 will be described.

First, a defocus amount is calculated based on an inputted CCD data(step #1450), and whether the eye sensing mode is ON or not isdetermined (#1455).

When the eye sensing mode is ON (EPF=1), whether focus detection isimpossible or not is determined at step #1460.

When focus detection is not impossible (LCF=0), a main subjectdetermination subroutine for determining whether a main subject has beenfound or not and a moving subject determination routine for determiningwhether the subject is moving or not are executed (steps #1465 and#1470). Then, the process returns.

When focus detection is impossible (LCF=1), determining that nodetection results are obtained so that the above two determinationscannot be made, the process returns.

When the eye sensing mode is not ON (EPF=0) at step #1455, whether thein-focus condition has been obtained or not is determined at step #1475.

When the in-focus condition has not been obtained (S1INFF=0), theprocess returns to move the lens for focusing.

When the in-focus condition has been obtained (S1INFF=1) , aone-shot/continuous changeover routine for performing a one-shotoperation when the subject is stationary and a continuous operation whenthe subject is moving is executed by use of an algorithm for determiningwhether the subject is moving or stationary according to the conditionof the subject. Then, the process returns (step #1480).

Of the above-mentioned algorithms, first, a subroutine for calculating adefocus amount will be described with reference to FIGS. 30 to 34. Thedefocus amount calculation subroutine consists of a P flow (FIG. 30), aQa flow (FIG. 31), an Ra flow (FIG. 32), an Sa flow (FIG. 33) and a Tflow (FIG. 34).

First, at step #1500, a flag AGCCHF showing a changeover of AGC is reset(AGCCHF=0).

In order to store defocus amounts calculated in the preceding threecalculation operations, defocus amounts are shifted in sequence amongmemories (steps #1505 to #1515).

A flag LCF showing that focus detection is impossible in all the areasand flags LCF1 to LCF4 showing that focus detection is impossible inrespective areas are set (steps #1520 and #1525). Flags INFF1 to INFF4showing that the in-focus condition has been obtained in respectiveareas are reset (step #1530). A flag ALMF showing the auxiliary lightmode is reset (step #1535).

Then, at step #1540, the number NAF of times of AF operation is set toNAF+1. At step #1542, a predetermined reference value KDF for detectingthe focus condition is set to 80 μm. At step #1545, correlationcalculation is performed for respective focus detection areas (first tofourth focus detection areas). The method of the correlation calculationwill not be described since it is irrelevant to this embodiment.

Based on a result of the correlation calculation, whether or not focusdetection is impossible in the first area is determined at step #1550.

When focus detection is impossible, the process proceeds to step #1575.When focus detection is possible, a defocus amount DF1 of the first areais calculated at step #1555, and the flag LCF1 showing that focusdetection is impossible for the first area is reset at step #1560. Then,the process proceeds to step #1565.

At step #1565, whether or not the defocus amount is the predeterminedvalue KDF or smaller is determined.

When it is the predetermined value KDF or smaller, the flag INFF1showing that the in-focus condition has been obtained is set (INFF1=1),and the process proceeds to step #1575. When the defocus amount exceedsthe predetermined value KDF, skipping step #1570, the process proceedsdirectly to step #1575.

Similar operations are performed for the second, third and fourth areasat steps #1575 to #1595, at steps #1600 to #1620 and at steps #1625 to#1645, respectively. The description thereof will be omitted. The first,second, third and fourth areas correspond to the distance measurementareas 1-1, 1-2, 4-1 and 4-2 (correspond to c, a, d and b of FIG. 18),respectively.

When step #1645 is completed, whether an MF operation is being performedor not is determined at step #1647.

The process returns when an MF operation is being performed. Otherwise,the process proceeds to step #1650.

At step #1650, whether or not all the flags LCF1 to LCF4 showing thatfocus detection is impossible in respective areas have been set isdetermined.

When all the flags LCF1 to LCF4 have been set (LCF1 to LCF4=1),determining that focus detection is impossible, the process proceeds tosubsequently-described step #1750.

When at least one of the flags LCF1 to LCF4 has not been set, theprocess proceeds to step #1655, where the flag LCF showing that focusdetection is impossible for all the areas is reset (LCF=0). Then, theflag LCEF showing that focus detection is impossible even in the lowcontrast scanning or the auxiliary light mode is reset (LCEF=0, step#1660), and a counter NLC showing the number of cases where focusdetection is impossible is reset (NLC=0, step #1665). Then, the processproceeds to step #1675.

At step #1675, a defocus amount which is greatest of the defocus amountsDF1 to DF4 is set as a defocus amount DF (steps #1675 and #1680).

The greatest defocus amount is set in order to find a subject which islocated closest to the camera. The defocus amount of the rear focus sideis a positive DF, while that of the front focus side is a negative DF.

Then, at step #1685, whether the eye sensing mode is ON or not isdetermined.

When the eye sensing mode is ON (EPF=1), the predetermined value KDF isset to 300 μm to increase the in-focus range. When the eye sensing modeis not ON (EPF≠1), the in-focus range is decreased at steps from #1700.

This is because a continuous mode (where the lens is moved again, if thesubject becomes out of focus again after an in-focus condition isobtained) is frequently ON in the eye sensing mode. That is, the lens isfrequently moved if the in-focus range is small, so that powerconsumption increases and one of the objects of the eye sensing mode,that is, to make no noise during operations cannot be achieved becauseof the noise caused by moving the lens. Therefore, the in-focus range isincreased in the eye sensing mode.

Then, whether or not the absolute value of the defocus amount DF whichis obtained at step #1700 is the predetermined value KDF or lower isdetermined.

When it is the predetermined value KDF or lower, the flag INFF showingthat the in-focus condition has been obtained is set (INFF=1) at step#1705, and whether the eye sensing mode is ON or not is determined atstep #1710.

When the eye sensing mode is not ON (EPF≠1), whether or not the flagS1INFF showing that the in-focus condition has been obtained by anoperation of the switch S1 has been set is determined at step #1712.

When the flag S1INFF has not been set (S1INFF≠1), the flag S1INFF is set(S1INFF=1) at step #1715, the counter NAF showing the number of times offocus detection is set to "0" at step #1720, and the process proceeds tostep #1725.

The process proceeds to step #1725 when the in-focus condition has notbeen obtained at step #1700 (|DF|>KDF) or when the eye sensing mode isON (EPF=1) at step #1710 or when the flag S1INFF has been set (S1INFF=1)at step #1712.

At step #1725, an average defocus amount DFAV showing the average of thedefocus amounts obtained in the preceding three operations and thecurrent operation is set as a preceding average defocus LDFAV. At stepamount #1730, the average defocus amount DFAV is obtained by(DF+L1DF+L2DF+L3DF)/4. At step #1735, whether the flag S1INFF has beenset or not is determined.

When the flag S1INFF has not been set (S1INFF≠1), the process returns.

When the flag S1INFF has been set (S1INFF=1), whether or not the numberNAF of times of focus detection after the in-focus condition has beenobtained is 4 (whether or not focus detection was performed four times)is determined.

When it is 4 (NAF=4), the average defocus amount DFAV is set to DFB atstep #1745, and the process returns. When it is not 4 (NAF≠4), theprocess returns.

When focus detection is impossible at step #1650 (LCF1 to LCF4=1), theprocess proceeds to step #1750, where whether the in-focus condition hasbeen obtained or not is determined.

When the in-focus condition has been obtained (INFF=1), the number NLCof consecutive cases where focus detection is impossible is obtained byNLC=NLC+1 (step #1754). Then, the process returns.

When the in-focus condition has not been obtained (INFF≠1), whether theauxiliary light mode flag ALMF has been set or not is determined at step#1752.

When the flag ALMF has not been set (ALMF≠1), whether or not theintegration time TAF1 is TK (70 msec) or more is determined at step#1755.

When the integration time TAK1 is TK or more (TAF1≧TK), determining thatfocus detection is impossible because of insufficient brightness, a flagALMF is set (ALMF=1) at step #1760. Then, the process returns.

When the flag ALMF is set (ALMF=1) at step #1752, whether the AGC is "1"or not is determined at step #1765.

When the AGC is "1", determining that focus detection cannot beperformed even if the gain is increased in the double speed mode, theflag LCEF is set (LCEF=1). Then, the process returns.

When the AGC is not "1", the average of data inputted from the CCD isobtained (step #1775). Then, whether the average is greater than apredetermined value KLV or not is determined at step #1780.

When it is greater than the predetermined value KLV (the averagevalue>KLV), determining that the data inputted from the CCD is greatenough to perform focus detection, the process proceeds to step #1770,where the flag LCEF showing that focus detection is impossible (LCEF=1)is set. Then, since there is no use in changing the gain, the processreturns.

When the average value is the predetermined value KLV or lower (theaverage value≦KLV), the flag AGCCHF is set (AGCCHF=1) at step #1785.Then, the process returns.

When the integration time is less than the predetermined value TK(TAF1<TK) at step #1755, the process proceeds to step #1790, wherewhether or not the flag LCSF showing the low contrast scanning mode hasbeen set is determined.

When the flag LCSF has been set (LCSF=1), the process returns.

When the flag LCSF has not been set (LCSF≠1), the flag FLDF is set(FLDF=1) in order to set the moving-out mode at step #1795, the flagLCSF showing the low contrast scanning mode is set (LCSF=1) at step#1798, and a drive amount N is set to NLG at step #1799. Then, theprocess returns.

Subsequently, the main subject determination subroutine executed at step#1465 of FIG. 29 will be described with reference to FIG. 35.

First, at step #1800, whether or not the flag MSF which is set when amain subject is determined has been set is determined.

When the flag MSF has not been set (MSF≠1), determining that the mainsubject has already been determined, the process returns at step #1805.

When the flag MSF has been set (MSF=1), the process proceeds to step#1805, where a focal length f is read from the zoom encoder. At step#1810, the lens movement amount N is obtained by multiplying theobtained defocus amount DF by a coefficient KN. The coefficient KN is apredetermined coefficient for converting the defocus amount DF to thedrive amount N. At step #1815, the drive amount N which is obtained atstep #1810 is added to the current moving-out amount NF to obtain thelens drive amount ND for causing the main subject to be in focus. Then,at step #1820, a distance D to the subject is obtained from themoving-out amount ND. As the method of obtaining the distance D, amethod where a ROM table is used or a method where calculation isperformed by use of a conversion coefficient may be employed. The methodwill not be described since it is irrelevant to this embodiment.

Then, at step #1825, a magnification β is obtained from the obtaineddistance D and focal length f, and at step #1830, whether it is afirst-time focus detection or not is determined.

When it is a first-time focus detection (NAF=1), whether or not thefocal length f is 105 mm or smaller and whether or not the magnificationβ is 1/25 or smaller are determined (steps #1835 and #1840). When bothof the conditions are fulfilled, determining that the main subject hasbeen determined, the flag MSF is reset (MSF=0, step #1870), the flagASZF for performing the auto stand-by zoom is set (ASZF=1, step #1875),and the process returns. When one of the conditions is not fulfilled,the process returns.

In determining the main subject, that the magnification is small meansthat the main subject is small. Since it is easy to capture a subjectwithin the image plane if the subject is small, the subject can fully becaptured in a first-time AF operation. Moreover, if the focal length isshort, the main subject is easy to capture, since it is less possiblethat the main subject moves out of the image plane when the camera isshaken to the right and left compared to the case where the focal lengthis long.

When it is not a first-time fOCUS detection at step #1830, the processproceeds to step #1845, where whether it is a second-time focusdetection or not is determined.

When it is a second-time focus detection (NAF=2), the difference Δbetween the preceding and current defocus amounts is obtained at byΔDF=|L1DF-DF| at step #1850. At step #1855, whether the focal length fis 210 mm or smaller is determined.

When the focal length f is 210 mm or smaller (f≦210), whether or not themagnification β is 1/15 or smaller is determined at step #1860.

When the magnification β is 1/15 or smaller (β≦1/15), whether or not thedifference ΔDF is 500 μm or smaller is determined at step #1865.

When the difference ΔDF is 500 μm or smaller (ΔDF≦500 μm), determiningthat the main subject has been determined, the flag MSF is reset (MSF=0)at step #1870, and the flag ASZF for performing the auto stand-by zoomis set (ASZF=1) at step #1875. Then, the process returns.

The process returns when at least one of the above three conditions(steps #1855, #1860 and #1865) is not fulfilled. The reason why thedifference ΔDF is considered is that whether main subjects have beenchanged or not is determined. The level of the determination of the mainsubject is less strict than that of the first-time focus detection. Thisis because the main subject becomes easier to find as the in-focuscondition is being approached (under the condition that the AF operationhas been performed once).

When it is not a second-time focus detection at step #1845, the processproceeds to step #1877, where it is a fourth-time focus detection or notis determined.

When it is a fourth-time focus detection (NAF=4), the process proceedsto step #1880, where the difference ΔDF between the defocus amount L3DFof the third focus detection and the current defocus amount is obtained.At step #1885, whether or not the difference ΔDF is 500 μm or smaller isdetermined.

When the difference ΔDF exceeds 500 μm, determining that subjects havebeen changed, the process returns. When the difference is within 500 μm,whether panning has occurred or not is determined at step #1890.

When panning has not occurred (PANM=2), determining that the mainsubject has been determined, the process proceeds to step #1870. Whenpanning has occurred (PANM≠2), determining that the main subject cannotbe determined, the process returns.

Panning sensing is performed by a subsequently-described panning sensinginterrupt TEPINT.

When it is not a fourth-time focus detection at step #1877, the processproceeds to step #1895, where whether or not one second has passed sincethe start of the focus detection is determined. When one second haspassed (TAF≧1 sec), determining that the main subject has forcibly beendetermined, the process proceeds to step #1870, where the driving of thelens is enabled.

When one second has not passed (TAF<1 sec) at step #1895, the processreturns.

Subsequently, the panning sensing interrupt TEPINT which is performedevery 250 msec will be described with reference to FIG. 36.

At steps #1900 and #1905, previous two modes where panning sensing wasperformed are stored (LPAN2, LPAN1). Then, a photometry value contrastC(t) and a standard value ΔB(t) are calculated (steps #1915 and #1920).

FIG. 60 shows a photometry pattern on the photographing image plane. Thephotometry pattern consists of portions 1 to 13 for spot photometry anda portion 14 for photometry of spaces among the portions 1 to 13 and theperiphery thereof. In correspondence with the photometry pattern, amulti-segment photometry device is provided in the camera. The mainsubject is determined by use of a calculation result which is outputtedfrom the multi-segment photometry device.

With respect to a photometry value Bn(t) (n=1 to 13) at a time t, thecontrast C(t) of all directions including lateral and oblique directionsis obtained by: ##EQU1##

If a luminance change amount ΔB(t) at a time t is standardized by theabove contrast, ΔB(t) is represented by ##EQU2## where Δt=250 msec.ΔB(t) is a luminance change amount per a unit time based on an output ofthe multi-segment photometry device.

At step #1925, whether the contrast C(t) is lower than a predeterminedvalue KCT or not is determined.

When it is lower than the predetermined value KCT (C(t)<KCT),determining that the subject is of low contrast and that the reliabilityof panning sensing is low, the process proceeds to step #1955, where theindetermination mode is set (PANM=3). Then, the process returns.

When the contrast C(t) is higher than the predetermined value KCT(C(t)>KCT), whether or not a photometry value B14(t) of a fourteenthphotometry device which indicates the brightness of the entirephotographing scene is lower than a predetermined value KB14 isdetermined.

When it is lower than the predetermined value KB14 (B14(t)<KB14),determining that reliability is low because of the dark photographingscene, the process proceeds to step #1955.

When the photometry value B14(t) is the predetermined value KB14 orhigher (B14(t)≧KB14), the process proceeds to step #1935, where whetheror not the standard value ΔB(t) is 1 or higher is determined.

When it is 1 or higher (ΔB≧1) determining that a main subject imagemoves by at least one of the photometry devices of FIG. 60, a datashowing the presence of panning (PANM=1) is set. When the standard valueΔB(t) is lower than 1 (ΔB(t)<1), whether or not the standard value ΔB(t)is 0.25 or lower is determined at step #1945.

When it is 0.25 or lower (ΔB(t)≦0.25), determining that the subject isstationary, a data (PANM=2) is set (step #1950), and the processreturns. When the standard value ΔB exceeds 0.25 (ΔB(t)>0.25), a datashowing the indetermination mode (PANM=3) is set (step #1955), and theprocess returns.

If a change corresponding to one photographing device can be detectedwhen one photemetry device is 5.2 mm, panning with a speed of 21mm persecond can be detected on the image plane since detection is made every250 msec.

Subsequently, the moving subject determination routine will be describedwith reference to FIG. 37.

First, at step #2000, whether the AF mode is the AF lock mode (AFM=1) ornot is determined. When it is the AF lock mode (AFM=1), the processreturns. When it is not the AF lock mode (AFM≠1), the process proceedsto step #2005, where whether the in-focus condition has been obtained ornot is determined.

When the in-focus condition has not been obtained (INFF≠1), the processreturns. When the in-focus condition has been obtained (INFF=1), theprocess proceeds to step #2010, where whether the auxiliary light modeis ON or not is determined.

When the auxiliary light mode is ON (ALMF=1), since the moving subjectdetermination is not made in the auxiliary light mode, after the AF lockmode (AFM=1) is set at step #2015, the process returns.

When the auxiliary light mode is not ON (ALMF≠1), speeds, of the movingsubject, which were obtained in nine preceding operations are stored atsteps #2020 to #2060. At step #2062, whether focus detection isimpossible or not is determined.

When focus detection is impossible (LCF=1), a current speed V is set asa preceding speed LV1 at step #2063. Then, the process returns. Whenfocus detection is not impossible (LCF≠1), the speed V of the movingsubject is calculated by use of the defocus amounts DF, L1DF and L2DF ofthree preceding operations.

Then, at step #2070, whether the eye sensing mode is ON or not isdetermined.

When the eye sensing mode is not ON (EPF≠1), the process returns.

When the eye sensing mode is ON (EPF=1) and it is the eye sensing modewhere the switch S1 has been turned from on to off (S1OFF=1), whether ornot the moving subject mode is ON when the switch S1 is turned ON isdetermined (step #2071). When the moving subject mode is ON, the processreturns so that the moving subject mode is maintained (step #2072). Whenit is not a mode where the switch S1 has been turned from on to off(S1OFF≠0), or even if it is a mode where the switch S1 has been turnedfrom on to off, when the moving subject mode is not ON when the switchS1 is turned on, whether or not the obtained speed V of the movingsubject is 0.75 mm/sec or higher on the image plane is determined (step#2075).

When the speed V is 0.75 mm/sec or higher (V≧0.75 mm/sec), the movingsubject mode is set (AFM=3) at step #2080. Then, the process returns.

When the speed V is lower than 0.75 mm/sec (V<0.75 mm/sec), the processproceeds step #2085, where the difference ΔDF between the defocus amountof the preceding operation and that of the current operation isobtained. At step #2090, whether or not the difference ΔDF is 1 mm orgreater is determined.

When it is 1 mm or greater (ΔDF≧1 mm), the process proceeds to step#2110, where the AF lock is set (AFM=1). Then, the process returns.

When the difference ΔDF is less than 1 mm (ΔDF<1 mm) at step #2090, ifpanning was detected in all the three panning detections (steps #2095,#2100 and #2105), the process also proceeds to step #2110 to set the AFlock mode.

On the contrary, when panning was not detected in at least one of thethree panning detections, the process proceeds to step #2115, where theAF mode is set to "2" (AFM=2). Then, the process returns.

Subsequently, the one-shot/continuous changeover routine will bedescribed with reference to FIG. 38.

First, at step #2150, whether or not a flag O/C1F showing that theprocess has passed through an S1 triggered auto one-shot/continuousroutine (to be described later) has been set is determined.

When it has not been set (O/C1F≠1), the S1 triggered autoone-shot/continuous routine is executed at step #2155. Then, the processreturns.

When the flag O/CF1 has been set (O/C1F=1), the process proceeds to step#2160, where whether or not the AF mode (the AF lock mode or thecontinuous mode) has been decided is determined.

When it has been decided (AFM≠2), the process returns. When it has notbeen decided (AFM=2), the process proceeds to step #2165, where a 0.5sec auto one-shot/continuous routine (to be described later) has beenexecuted or not is determined.

When it has been executed, since a flag O/C2F showing that the 0.5 secauto one-shot/continuous routine has been executed has been set(O/C2F=1), an S1 auto one-shot/continuous routine is executed at step#2175. Then, the process returns.

When the flag O/C2F has not been set (O/C2F≠1), the 0.5 sec autoone-shot/continuous routine is executed at step #2170. Then, the processreturns.

The above-mentioned S1 triggered one-shot/continuous routine will bedescribed with reference to FIG. 39.

The routine is executed only once when the photographing preparationswitch S1 is turned on in the eye sensing mode. In the routine, an AFlock mode determination, a continuous mode determination (in case of amoving subject), and an indetermination mode determination are madeaccording to the condition of the subject.

First, at step #2200, whether or not the subject is moving (moving fast)when the eye sensing mode is ON is determined.

When the subject is moving (AFM=3), the flag O/C1F showing that the S1triggered auto one-shot/continuous routine has been executed is set(O/C1F=1) at step #2235. Then, the process returns.

When the subject is not moving (AMF≠3) at step #2200, the processproceeds to step #2203, where whether the AF lock mode is ON or not isdetermined.

When the AF lock mode is ON (AFM=1), the process proceeds to step #2235.When the AF lock mode is not ON (AFM≠1) at step #2203, the processproceeds to step #2205, where whether or not the magnification β is 1/25or greater is determined.

When the magnification β is 1/25 or greater (β≧1/25), determining thatthe number of moving subjects is small or that the moving subject cannotbe captured (since the speed of the moving subject increases as themagnification increases on the image plane), the AF mode is set to theAF lock mode (AFM=1, step #2240). Then, the process proceeds to step#2235.

When the magnification β is smaller than 1/25 (β<1/25) at step #2205,the process proceeds to step #2210, where whether or not the integrationtime TAF1 is 60 msec or more is determined.

When it is 60 msec or more (TAF1≧60 msec), since the reliability of datadeteriorates because of insufficient brightness and the performance forcapturing a moving subject deteriorates because of the long integrationtime, the AF mode is set to the AF lock mode (AFM=1). Then, the processproceeds to step #2235.

When the integration time TAF1 is less than 60 msec (TAF<60 msec) atstep #2210, whether the subject is moving at a stable speed or not isdetermined by the subject speed of the sixth operation retroactivelycounted from the current, that of the third operation retroactivelycounted from the current and that of the current operation (steps #2215,#2220, and #2225).

When the speed is a predetermined speed KV or higher (for example, thespeed KV is 0.5 mm/sec or higher on the image plane) in all the abovethree determinations, determining that the subject is moving, the AFmode is set to "continuous" (AFM=3, step #2230). Then, the processproceeds to step #2235.

When the speed is lower than the predetermined speed KV in at least oneof the above three determinations, determining that the mode cannot bedetermined, the AF mode is set to "2" representative of theindetermination mode (AFM=2) at step #2245, and the counter NAF showingthe number of times of focus detection is reset (NAF=0) at step #2250.Then, the process returns.

Subsequently, the 0.5 sec auto one-shot/continuous routine will bedescribed with reference to FIG. 40. The 0.5 sec of the 0.5 sec autoone-shot/continuous routine is not an accurate value. This routine isnamed based on the fact that approximately 0.5sec is required forperforming a sequence, including focus detection, of a camera seventimes.

First, at step #2300, whether or not a zooming operation was performedafter the in-focus condition had been obtained after the turning on ofthe switch S1 is determined.

When a zooming operation was performed (ZMF=1), since the image haschanged so that the moving subject cannot be detected with a sufficientaccuracy, the AF mode is set to the AF lock mode (AFM=1) at step #2312,and the flag O/C2F showing that the 0.5 sec auto one-shot/continuousroutine was executed is set (O/C2F=1). Then, the process returns.

When no zooming operation was performed (ZHF=0), whether focus detectionbecame impossible four consecutive times or not is determined at step#2312.

When focus detection became impossible for consecutive times (NLC=4),determining that the moving subject determination is impossible, theprocess proceeds to step #2312 to set the AF lock mode (AFM=1). Then, atstep #2375, the flag O/C2F showing that the 0.5 sec autoone-shot/continuous routine has been executed is set (O/C2F=1), and theprocess returns.

When focus detection did not became impossible four consecutive times(NLC≠4), after the previously-described moving subject determination(FIG. 37) is made at step #2310, whether the number NAF of times offocus detection is 7 or not is determined at step #2315.

When the number NAF of times of focus detection has not become 7, the AFmode is set to "2" representative of the indetermination mode (AFM=2) atstep #2320. Then, the process returns.

When the number NAF of times of focus detection is 7, the processproceeds to step #2320. When the speed of the moving subject of theretroactively sixth operation and that of the retroactively thirdoperation are the predetermined value KV or higher (steps #2320 and#2325) or when the moving subject speed of the retroactively thirdoperation and that of the current operation are the predetermined valueKV or higher (steps #2345 and #2350), determining that the subject ismoving at a stable speed, the process proceeds to step #2340. After thecontinuous mode is set (AFM=3) at step #2340, the process proceeds tostep #2375.

The level, relating to speed, of the moving subject determination isdifferent among the S1 triggered auto one-shot/continuous routine, the0.5 sec auto one-shot/continuous routine and the subsequently-describedS1 auto one-shot/continuous routine. The level is less strict in theorder of the S1 auto one-shot/continuous routine, the S1 triggered autoone-shot/continuous routine and the 0.5 sec auto one-shot/continuousroutine (stricter in the reverse order).

The S1 auto one-shot/continuous routine is executed at an interval (0.5msec or more) after the in-focus condition is obtained. Consequently,there is a possibility that the user is performing panning, and a movingsubject which is not intended by the user may be detected. As a result,the subject determination accuracy may be poor. Therefore, thedetermination level of the S1 auto one-shot/continuous routine isstrictest.

Thus, the moving subject determination can be performed more accuratelyby making the determination level stricter.

The 0.5 sec auto one-shot/continuous routine is executed in 0.5 secafter the switch S1 is turned on. Since the switch S1 is usually turnedon after the subject to be photographed is firmly decided, the focusdetection data are accurate and highly reliable in this routine.Therefore, the determination level is least strict in this routine.

In the S1 triggered auto one-shot/continuous routine, reliability(probability that the AF area sufficiently captures a subject that theuser intends to photograph) is low since the focus detection dataobtained in the eye sensing mode are used. Consequently, the reliabilityis not so low as that in the S1 auto one-shot/continuous routine.Therefore, the strictness of the determination level is between those ofthe other two routines.

Returning to the flow chart of FIG. 40, when at least one of the movingsubject speeds is lower than the predetermined value KV in the movingsubject mode determination where the moving subject speed is used, theprocess proceeds to step #2330. Then, when a panning mode is ON in boththe retroactively first and second focus detections (LPAN2=1 at step#2330 and LPAN1=1 at step #2335), or when the panning mode is ON in theretroactively first focus detection and the current focus detection(LPAN1=1 at step #2355 and LAPNM=1 at step #2360), determining that asubject cannot be determined so that a moving subject cannot bedetected, the process proceeds to step #2340 in order to set thecontinuous mode (AFM=3), since the AF lock mode cannot be set.

When the panning mode is not ON in the determination of at least one ofsteps #2330, #2335, #2355 and #2360, the process proceeds to step #2365,where the AF mode is set to the indeterminat ion mode (AFM=2). At step#2370, the number NAF of times of focus detection is reset (NAF=0).Then, the process proceeds to step #2375.

Subsequently, the S1 auto one-shot/continuous routine will be describedwith reference to FIG. 41.

First, at step #2400, whether or not the difference between the latestaverage defocus amount DFAV and the average defocus amount obtained whenthe in-focus condition is obtained after the switch S1 is turned on is300 μm or more in infinity direction is determined.

When the difference is 300 μm or more (DFB-DFAV≧300 μm) in infinitydirection, the AF lock mode is set (AFM=1) at step #2460, and theprocess returns. This operation is to cope with, so that the user'sintention is met, a phenomenon which occurs when the camera is shaken tothe right and left in order to set the AF lock mode, that is, aphenomenon which occurs when the focus is suddenly changed from a mainsubject to the background. The same phenomenon occurs when the mainsubject is slowly moving away (when the subject is moving fast, themoving subject mode has already been set). However, since there is notmuch probability that the main subject is slowly moving away and since,in the AF system of this embodiment, the eye sensing mode is set toenter the continuous mode as soon as the release button is turned off,if the camera is focused on another subject, the camera is immediatelyfocused on the main subject by a quick and easy operation. Therefore,the AF lock method is adopted. The defocus amount DF is set so as to besmaller as the main subject is farther from the camera.

When the main subject is not moving away under the above-describedcondition (DFB-DFAV<300 μm), the process proceeds to step #2405, wherewhether or not an irrelevant subject passed across the image plane isdetermined by determining whether or not the difference between thecurrent defocus amount and the latest average defocus amount DFAV is 500μm or more. The AF lock mode is set when an irrelevant subject passed.

When the difference is 500 μm or more (DF-DFAV≧500 μm), determining thatan irrelevant subject passed, the process proceeds to step #2460 to setthe AF lock mode.

When the difference is less than 500 μm (DF-DFAV<500 μm), whether or notzooming was performed simultaneously with the 0.5 sec autoone-shot/continuous routine and whether or not focus detection wasimpossible four consecutive times are determined at steps #2410 and#2415, respectively.

When zooming was performed (ZMF=1) at step #2410 or focus detection wasimpossible four consecutive times (NLC=4) at step #2415, the processproceeds to step #2460 to set the AF lock mode.

When the results of both determinations are "No", the process proceedsto step #2420, where the previously-described moving subjectdetermination routine (FIG. 37) is executed.

Then, the process proceeds to step #2425. At step #2425, whether or notfocus detection was performed ten or more times in the autoone-shot/continuous routine is determined.

When focus detection was not performed ten or more times (NAF<10),determining that the AF mode is the indetermination mode, the processproceeds to step #2455, where the AF mode is set to "2". Then, theprocess returns.

When NAF is ten or more (NAF≧10), the process from step #2430 isexecuted. When all of the moving subject speed of the retroactivelyninth focus detection, that of the retroactively sixth focus detection,that of the retroactively third focus detection and that of the currentfocus detection are the predetermined speed KV or higher, determiningthat the moving subject mode is required (steps #2430 to #2445), and theprocess proceeds to step #2450, where the AF mode is set to "3". Then,the process returns.

When the speed is lower than the predetermined speed KV in at least oneof the above determinations, the process proceeds to step #2455, wherethe AF mode is set to the indetermination mode.

Finishing the description of the routines of the algorithm, an AF lensdrive routine (executed at step #1310 of FIG. 23) will subsequently bedescribed with reference to FIG. 42.

First, at step #2500, the amount by which the lens has to be driven isset. At step #2505, a flow for limiting, according to the currently setphotographing mode (for example, the eye sensing mode), a drive speedobtained based on the set amount is executed. Then, the lens is driven(step #2510, the lens drive subroutine of FIG. 21), and whether thedriving of the lens has been completed or not is determined (step#2515).

When the driving has not been completed (LMVF≠0), whether the lowcontrast scanning is being performed or not is determined (step #2520).When the low contrast scanning is being performed (LCSF=1), the processreturns to perform focus detection while driving the lens. When thescanning is not being performed (LCSF=0), after waiting until thedriving of the lens is completed (LMVF=0), the process returns. Theprocess also returns when the driving has been completed (LMVF=0) atstep #2515.

The above-mentioned drive amount setting routine (executed at step #2500of FIG. 42) will be described with reference to FIG. 44.

At step #2550, whether focus detection is determined to be impossible ornot is determined. When it is determined to be impossible (LCEF=1), theprocess proceeds to step #2585, where the drive amount N is set to "0".Then, the process proceeds to step #2575.

When the flag LCEF has not been set (LCEF≠1) at step #2550, whether thelow contrast scanning mode is ON or not is determined at step #2551.

When the low contrast scanning mode ON (LCSF=1), the process proceeds tostep #2575. When the low contrast scanning mode is not ON (LCSF=0),whether the AF lock mode is ON or not is determined at step #2552. Whenthe AF lock mode is not ON (AFM≠1), whether the in-focus condition hasbeen obtained or not is determined at step #2555.

When the in-focus condition has not been obtained (INFF≠1) at step#2555, a defocus amount DFV which a subject moves during a total time ofthe integration time TAF1 and the time TK required for the defocusamount calculation is obtained at step #2560. Then, at step #2565, a newdefocus amount DF is obtained based on the defocus amount DFV and thecalculated defocus amount Dr. Then, the lens drive amount N is obtained(N=DF×K) at step #2570, ND is set to |N| at step #2575, and a drivenamount N1 of the lens is set to 0 at step #2580. Then, the processreturns.

When the AF lock mode is ON (AFM=1) at step #2550 or when the in-focuscondition has been obtained (INFF=1) at step #2555, after the driveamount is set to "0" at step #2585, the process proceeds to step #2575.

Subsequently, a drive speed limiting routine will be described withreference to FIG. 43.

First, at step #2600, whether the eye sensing mode is ON or not isdetermined.

When the eye sensing mode is not ON (EPF≠1), a drive speed correspondingto the rotation number ND which is set at the above-described step islimited to LDVmax based on Table 1 (TA2). At step #2630, asubsequently-described flag EP1F is reset (EP1F=0). Then, the processreturns.

When the eye sensing mode is ON (EPF=1), whether it is a first-time lensdrive in the eye sensing mode or not is determined at step #2605.

When it is a first-time lens drive (EP1F=0), at step #2615, the speedlimit is set to 8V1 which is the maximum speed in the eye sensing modein order to provide an effect of the one-shot AF. At step #2615, theflag EP1F is set (EP1F=1). Then, the process returns.

When it is not a first-time lens drive (EP1F=1), the maximum speedLDFmax which is in accordance with the rotation number is set based onTable 1 (TA1) if the moving subject mode is not ON (AFM≠3) (step #2620)and based on Table 1 (TA12) if the moving subject is ON (AFM=3) (step#2622). Then, the process returns.

In order to quietly move the lens when only the user's looking throughthe finder starts the lens drive, the maximum speed LDVmax is set to belower when the eye sensing mode is ON (that is, when EPF=1 at step#2600) than when the switch S1 is depressed without the user's lookingthrough the finder (that is, when EPF≠1 at step #2600). Moreover, inorder to capture a subject as soon as possible, the maximum speed LDVmaxis set to high when the moving subject mode is ON.

Actually, the lens drive is more frequently started by the user'slooking through the finder than by the depression of the switch S1.However, the lens drive speed is strictly limited in order to ordinarilymove the lens during an AF operation. On the other hand, when the lensdrive is started by the depression of the switch S1, priority is givento focusing speed rather than to quietness or ordinary, since, in thiscase, the user intends to perform focusing as a photographingpreparation.

Returning to the flow chart of FIGS. 13, 14 and 15, when the processreturns from the previously-mentioned AF control subroutine (step #540of FIG. 14), the process proceeds to step #542 where the zoom controlsubroutine is executed. After zooming is completed, the process proceedsto step #560. Moreover, when it is determined that the photographingpreparation switch S1 is not ON at step #535, the process proceeds tostep #545, where whether or not the flag LMVF showing that the lens isbeing moved has been set is determined. When the flag LMVF has been set,after the AF lens stop subroutine (FIG. 9) is executed at step #550, theprocess proceeds to step #542. When the flag LMVF has not been set,skipping step #550, the process proceeds to step #542.

The zoom control subroutine will be described with reference to FIG. 45.

Firstly, at step #2650, the zoom drive speed is set to I (low speed).Then, at step #2655, whether the auto stand-by zoom is ON or not isdetermined.

The auto stand-by zoom is a zooming operation which is performed basedon a focal length determined according to a subject size estimated basedon a distance to a main subject determined in the main subjectdetermination subroutine in focus detection in the eye sensing mode. Theauto stand-by zoom is performed only once.

When the auto stand-by zoom is ON (ASZF=1), an appropriate focal lengthf1 is obtained, by use of a ROM table, from the distance D obtained forthe auto stand-by zoom (steps #2657, and #2660).

Now, an ASZ (auto stand-by zoom) subject distance detection subroutine(step #2657) will concretely be described with reference to FIG. 46.

In focus detection, a multi-point distance measurement of four points isperformed as shown in FIGS. 18 and 19. In the auto stand-by zoom, asubject can be out of the image plane, for example, if a distancemeasurement is performed with respect to the distance measurement areasc and d of FIG. 18 and zooming-up is performed based on a distancemeasurement value thereof. Therefore, for the auto stand-by zoom,zooming is preferably performed based on distance measurement dataobtained with respect to a central distance measurement area when thedistance measurement has been performed with respect to the centraldistance measurement area. For this reason, the data obtained in theflow of FIGS. 30, 31, 32, 33 and 34 are checked again in the flow ofFIG. 46. In this routine, a first, a second, a third and a fourthdistance measurement positions correspond to the left, central, rightand upper positions of FIG. 19, respectively, and DF1, DF2, DF3 and DF4are distance measurement data with respect to respective positions. Thedetermination of the distance measurement data is made in the order ofDF2, DF4, DF1 and DF3. When the distance measurement data DF2 withrespect to the second distance measurement position is obtained (step#2800), the subject distance is calculated based on the data DF2 (step#2845), and the process returns. When the central position is of lowcontrast and the distance measurement data DF4 with respect to thefourth distance measurement position is obtained (step #2805), thesubject distance is calculated based on the data DF4 (step #2840), andthe process returns. Subsequently, the determination of DF1 of the leftposition and DF3 of the right position and calculation of the subjectdistance based on respective data are performed in the same manner(steps #2810, #2835, #2815 and #2830). Then, the process returns.

When all of the four positions are of low contrast, the flag ASZF isreset (ASZF=0) in order to inhibit the auto stand-by zoom at step #2820,a stack of the microcomputer is cleared at step #2825, and the processjumps to 43A to return to the flow chart of FIG. 45. That is, thesubject distance is calculated based on a data obtained with respect toa distance measurement area which is as close to the optical axis of thetaking lens as possible, and the auto stand-by zoom is performed basedon the subject distance; the auto stand-by zoom is not performed whenthe distance measurement is impossible. Moreover, in only the autostand-by zoom, priority is given to the data obtained with respect tothe central distance measurement position.

Then, whether the current focal length f is equal to the focal length f1or not is determined (step #2670). When it is equal to f1, the processreturns. When it is not equal to f1, whether or not a ratio between fand f1 (f/f1 or f1/f) is 2 or higher is determined (step #2675). When itis 2 or higher, the zoom speed is set to II (high speed) at step #2680and the process proceeds to step #2685. When the ratio is lower than 2,the process proceeds directly to step #2685.

At step #2685, whether f1>f or not is determined.

When f1>f, zoom up control is performed (step #2695). When f1<f, zoomdown control is performed (step #2690). Then, zooming is performed atthe speed which is set at the above-mention step, and the process waitsuntil f=f1. When f=f1, the lens is stopped (step #2705), and the flagASZF is reset (step #2708). Then, the process returns.

When the flag ASZF has not been set (ASZF≠1) at step #2655, whether ornot the zoom up switch SZU or the zoom down switch SZD has been operatedis determined (steps #2710 and #2730). When the switch SZU or SZD hasbeen operated, zooming up (step #2715) or zooming down (#2735) isperformed at a low speed. Then, the process proceeds to step #2720,where whether or not the in-focus condition has been obtained after theswitch S1 had been depressed is determined. When the in-focus conditionwas obtained after the switch S1 had been depressed (S1INFF=1), a flagZMF showing that zooming has been performed is set (ZMF=1, step #2725),and the process returns. Otherwise (S1INFF≠1), the process directlyreturns.

When neither switch SZU or SZD has been operated at steps #2710 and#2730, the process proceeds to step #2740, where the zoom lens isstopped. Then, the process returns.

Returning to the V flow of FIG. 14, at step #560, a film sensitivity SVis inputted from the film sensitivity reading circuit DX. At step #565,a luminance BV0i (i-1 to 14) of a subject at open aperture is inputtedfrom the photometry circuit LM.

The data input will be described with reference to thepreviously-mentioned FIG. 4. First, the level of the terminal CSDX orCSLM is set to low, and a circuit from which a data is inputted isselected (between DX and LM). Then, the data is inputted through theterminal SIN. When the data input is completed, the level of theterminal CSDX or CSLM is changed to high to finish the data input.

At step #570, a photometry value BV0 is calculated based on the BV0i(i=1 to 14). At step #575, an exposure calculation subroutine (FIG. 22)is executed.

When the exposure calculation subroutine is called, first, an exposurevalue EV is obtained by EV=BV0+AV0+SV at step #1285. BV0 is a subjectluminance value obtained in an exposure measurement at open aperture,AV0 is an open aperture value and SV is a film sensitivity. A shutterspeed TV and an aperture value AV are calculated from the exposure valueEV based on a predetermined AE program line (step #1290). Then, whetheror not the obtained shutter speed TV is a predetermined value TVk orlower is determined (step #1291). When it is the predetermined value TVkor lower, determining that hand shake will easily occur, the flash ischarged in order to control flash (step #1292). The process waits untilthe charging is completed (step #1293). When a signal indicating thatthe charging is completed is transmitted from the flash control portionFL, the shutter speed is set to a synchronizing speed TVx, and theprocess returns (step #1294). Conversely, when TV>TVk, the processimmediately returns. The AE program line is a program line for providinga relationship between the shutter speed and the aperture value. Thedescription and drawing thereof will be omitted.

Returning to FIG. 14, after the exposure calculation is completed, dataon a control shutter speed TVC, a control aperture value AVC, an AFarea, focus condition, presence/absence of a moving subject andimpossibility of focus detection are serially outputted to the displaycontrol circuit DISPC. Based on the inputted data, the display controlcircuit DISPC causes the display portion DISPI, the display portionDISPII and the display portion DISPIII to provide a display (step #590).

After the display, whether the release switch S2 is ON or not isdetermined at step #595.

When the release switch S2 is ON, whether the in-focus condition hasbeen obtained or not is determined by the flag INFF at step #610. Whenthe in-focus condition has been obtained (INFF=1), the process proceedsto step #615. When the in-focus condition has not been obtained, theprocess proceeds to step #638 without a release operation beingperformed.

At step #615, all the interrupts are inhibited. At step #620, exposurecontrol is performed. After the exposure control is completed, film isadvanced by one frame at step #625. Then, in order to show that the S1ONsubroutine is completed, the flag S1ONF is reset (S1ONF=0) at step #630.At step #632, the interrupt S1INT applied by the turning on of theswitch S1 is permitted. At step #634, the timer interrupt I for eyesensing is permitted at step #634. After the timer for the timerinterrupt I is reset and started (step #635), the process returns.

When it is determined that the release switch S2 is not ON at step #595,the process proceeds to step #638 similarly to the case where it isdetermined that the in-focus condition has not been obtained at step#610. At step #638, whether the photographing preparation switch S1 isON or not is determined.

When the photographing preparation switch S1 is ON, a timer T2 formaintaining power source is reset and started at step #640, and theprocess returns.

When it is determined that the photographing preparation switch is notON at step #638, whether or not the flag EPF showing that it has beensensed that the user is looking through the finder has been set isdetermined (step #644). When it has been set (EPF=1), the processreturns to step #500.

When the flag EPF has not been set (EPF≠1), the process proceeds to step#650, where whether zooming is being performed or not is determinedbased on a zoom switch data.

When zooming is being performed, the process proceeds to step #640,where the timer T2 for maintaining power source is reset and started inorder to extend a power source maintaining time. Then, the processreturns. When it is determined that zooming is not being performed atstep #650, the process proceeds to step #655, where whether or not fiveseconds have passed since the timer T2 was started is determined. Whenfive seconds have not passed, the process returns. When five secondshave passed, the process proceeds to step #630, where photographingcompletion control initiated by the turning off of the switch S1 isperformed.

Returning to the flow chart of FIG. 5, when it is determined that themain switch SM is not ON at step #20, the process proceeds to step #80,where interrupts other than the interrupt SMINT which is applied by theturning on of the main switch SM are inhibited. Then, the AF lensmoving-in subroutine is executed (step #90).

Thereby, the AF lens is moved to the most moved-in position. Thisoperation is not described here, since it has already been described.

After the AF lens moving-in subroutine (FIG. 6) is executed, the levelof the terminal PW1 is set to low in order to disable the transistor Tr1which supplies power to circuits provided in the camera body BD and tothe zoom motor M3 provided in the lens LE (step #120). Further, thelevel of the terminal PW0 is set to low in order to disable the DC/DCconverter DD (step #125). Then, after interrupts other than theinterrupt SMINT applied by the turning on of the main switch SM areinhibited (step #130), the process halts (enters the sleep condition).

In-image-plane displays and out-of-image-plane AF condition displayswhich are provided when the AF mode is ON (where a wide area isselected) will be described with reference to FIG. 47.

(a) is a display provided when the main switch is OFF.

(b) a display provided when the main switch is ON.

(c) is a display when it is sensed that the user is looking through thefinder after the main switch is turned on. At this time, the wide areais displayed. In the spot mode, the central portion is displayed.

(d) is a display provided when the in-focus condition is obtained by anAF operation. At this time, an out-of-image-plane display <o> is turnedon.

(e) is a display provided when the moving subject mode is ON. Out of theimage plane, o is turned on and only <> blinks.

(f) is a display provided until the in-focus condition is obtained by anAF operation not in the eye sensing mode but under the S1ON condition.

(g) is a display provided in the AF lock mode or during the autoone-shot/continuous detection which is made after the switch S1 isturned on. When the subject is moving, (e) is displayed. Out of theimage plane, o is turned on.

(h) is a display provided during the 0.5 sec auto one-shot/continuousdetection. Out of the image plane, <o> is turned on.

(i) is a display provided when focus detection is impossible (LCEF=1).The central o blinks.

Next, displays provided when a manual focusing mode is ON will bedescribed with reference to FIGS. 48A and 48B.

(J) is a display provided in an FA (focus aid) mode (when the wide areais selected).

(K) is a display provided when the switch S1 is turned on. An in-focusarea is displayed, if any, while the user is looking through the finder.The presence/absence of the in-focus area is determined by the flagsINFF1 to INFF4.

(L) a display, similar to is (K), provided when the switch S1 is turnedon.

(N) is a display provided in the spot AF mode (while the user is lookingthrough the finder).

(O) is a display, similar to (N), provided when the switch S1 is turnedon.

In this embodiment, as described above, the in-focus condition isimmediately obtained when the user looks through the finder during aneye-start AF operation. That is, an AF operation is performed at a highspeed until the first-time in-focus condition is obtained. The in-focusdisplay is not provided at this time.

After the first-time in-focus condition is obtained, the in-focuscondition is always maintained even if the subject distance is varied,and an AF operation is quietly performed during focusing without causingthe user to be conscious of AF operation. As a result, framing issmoothly performed. This is because a silent continuous AF is performedat a low speed after the first-time in-focus condition is obtained.Therefore, the user realizes that the camera is always under a stand-bycondition so that release can be performed at any time. After thefirst-time in-focus condition is obtained, the in-focus display isturned on so far as the in-focus is obtained. Simultaneously therewith,the release is enabled.

Subsequently, variations (second to fourth embodiments) of theabove-described first embodiment will be described.

The variations are different from the first embodiment in:

(i) that no low contrast scanning is performed when the eye sensing modeis ON;

(ii) that no auxiliary light is emitted when the eye sensing mode is ON;and

(iii) that AF lock mode (continuous AF) is not set when the eye sensingmode is ON.

The reason for the above differences will be described.

Concerning (i), the reason is that, when the eye sensing mode isinadvertently set, it is not desirable that the lens is driven in theentire range when focus detection is determined to be impossible by eyesensing which is performed, for example, while the user is holding thecamera by the grip portion about he or her waist or when the eye sensingportion senses something other than the user's eye and the peripherythereof.

This causes problems such as an increase in power consumption and anoise caused by an unintended lens drive.

Concerning (ii), the reason is that power consumption increases ifauxiliary light is emitted every time an AF operation is performed inthe eye sensing mode where the AF mode is usually set to "continuous".

Concerning (iii), the reason is that, since the subject is usuallysecurely captured when the switch S1 (which is always depressed toperform photographing) is depressed, if the subject which was determinedtherebefore is AF-locked, it is often impossible to focus the camera ona subject intended by the user.

Moreover, when the switch S1 is not being operated, subjects arefrequently changed since the user is looking through the finder to lookfor a subject. When subjects have been changed, trouble is caused if thesubject which was determined therebefore is AF-locked. Therefore, the AFlock mode is not set.

The second to fourth embodiments will be described with reference to thedrawings where only portions different from the first embodiment areshown.

In the second embodiment, the defocus amount calculation subroutine andthe moving subject determination subroutine are partly different fromthose (FIGS. 30 to 34, and FIG. 37) of the first embodiment.

In the second embodiment, the defocus amount calculations subroutineconsists of the P flow (FIG. 30), the Qa flow (FIG. 31), an Rb flow(FIG. 49), and Sb flow (FIG. 50) and the T flow (FIG. 34). That is, theRb flow of FIG. 49 and the Sb flow of FIG. 50 are variations of the Raflow of FIG. 32 and the Sa flow of FIG. 33 of the first embodiment,respectively. First, the different portions will be described.

In FIG. 49, when the integration time TFA1 is the predetermined time TKor more (TAF1≧TK) at step #1755, the process proceeds to additional step#1756, where whether the eye sensing mode is ON or not is determined.

When the eye sensing mode is ON (EPF=1), the flag LCEF is set (LCEF=1)in order to provide a display showing that focus detection is impossibleso that the auxiliary light mode is not set, and then, the processreturns.

When the eye sensing mode is not ON (EPF≠1), the previously-describedprocess from step #1760 is executed (FIG. 32).

When the integration time is less than the predetermined time TK(TAF1<TK) at step #1755, the process proceeds to step #1788 of the Sbflow (FIG. 50). At step #1788, whether the eye sensing mode is ON or notis determined.

When the eye sensing mode is ON (EPF=1), the flag LCEF is set (LCEF=1)in order to provide a display showing that focus detection is impossibleso that the low contrast scanning mode is not set, and then, the processreturns.

When the eye sensing mode is not ON (EPF≠1), the previously-describedprocess from step #1790 is executed (FIG. 33).

FIG. 51 shows a variation of the moving subject determination of FIG.37. Only the portions different from those of the flow of FIG. 37 willbe described.

First, at step #2000H, whether the in-focus condition has been obtainedor not is determined. When the in-focus condition has not been obtained(INFF=0), the process returns. When the in-focus condition has beenobtained (INFF=1), whether the eye sensing mode is ON or not isdetermined (step #2002H).

When the eye sensing mode is ON (EPF=1), the process proceeds to step#2017H, where whether the auxiliary light mode is ON or not isdetermined. When the auxiliary light mode is ON (ALMF=1), the processreturns without the moving subject determination being made. The AF lockmode is not set at this time. When the auxiliary light mode is not ON(ALMF=0), the process proceeds to step #2020, where the process similarto that of FIG. 37 is executed.

When the eye sensing mode is not ON (EPF=0), whether the AF lock mode isON or not is determined at step #2005H. When the AF lock mode is ON(AFM=1), the process returns. When the AF lock mode is not ON (AFM=0),whether the auxiliary light mode is ON or not is determined at step#2010H.

When the auxiliary light mode is ON (ALMF=1), after the AF lock mode isset (AFM=1) at #2015H, the process returns. When the auxiliary lightmode is not ON (ALMF≠1), the process proceeds to step #2020.

In FIG. 37 of the first embodiment, the determination of the AF lock ismade after step #2075. On the contrary, in FIG. 51, the process returnswhen the speed V on the image plane is lower than 0.75 mm/sec at step#2075. This is for the setting of the AF lock by deleting thedetermination of the AF lock.

Concerning the displays, they are partly different from of FIG. 47. Theshift from (d) to (g) is deleted as shown in FIG. 52.

Moreover, when (d) is displayed, after a first-time in-focus conditionis obtained, <o> is displayed under the in-focus condition and <> isdisplayed under the out-of-focus condition. Further, similar displayrsare provided with respect to (e) and (d) when the moving subject mode isON.

In the above-described second embodiment, low contrast scanning notperformed when the eye is sensing mode is ON. However, thesubsequently-described in third embodiment, low contrast scanning isperformed only when it is necessary, and thereby the number of timesthereof is reduced. Low contrast scanning is necessary when focusdetection possible range DFEN along the optical axis is smaller than adefocus range DFRA (from a minimum object distance to infinity) of thelens.

This case is shown in an Sc flow of FIG. 53. The Sc flow is a flow, ofthe third embodiment, which corresponds to the Sb flow (FIG. 50) of theabove-described second embodiment. In the Sc flow, when it is determinedthat the eye sensing mode is ON (EPF=1) at step #1788, the processproceeds to additional step #1788-1, where whether or not the focallength is a predetermined value (f=210 mm) or larger is determined.

When the focal length is 210 mm or larger (f≧210), DFEN is equal to orsmaller than DFRA (DFEN≦DFRA), and the process proceeds to step #1790 toperform low contrast scanning. While the focal lengths are compared inthis embodiment since the lens is not an interchangeable lens, in caseof an interchangeable lens, DFRA may be read from the lens to compare itwith DFEN.

Subsequently, the fourth embodiment will be described.

The auxiliary light mode is inhibited in the second and thirdembodiments where the AF mode is basically set to "continuous". However,the emission of auxiliary light is effective for AF when focus detectionis impossible due to insufficient brightness or low contrast.

However, as described above, the emission of auxiliary light increasespower consumption. In this embodiment, by using auxiliary light at therate of one every plural times of focus detection, power consumption isrestrained to an amount by which no problems are caused. Specifically,in the auxiliary light mode where auxiliary light is emitted every tenfocus detections, auxiliary light is emitted every 1 to 1.5 sec sincethe integration time is long (because of low brightness).

In the fourth embodiment, the S1ON subroutine consists of a Ub flow(FIG. 54), the V flow (FIG. 14) and the W flow (FIG. 15). The Ub flow ofFIG. 54 is a variation of the Ua flow of FIG. 13 of the S1ON subroutineof the first embodiment. The difference of FIG. 54 from FIG. 13 is thatstep #501-11 is added where a counter NALT for counting, as an initialsetting, the number of times of focus detection in the auxiliary lightmode is reset to 0. By this additional step, the auxiliary light AF iscontrolled again after the switch S1 is turned on.

FIG. 55 shows a variation of the timer interrupt II of FIG. 8. Step #332is added where a timer TLC for counting a time from when focus detectioncannot be made even if low contrast scanning is performed is reset andstarted. This step is added in order to prevent low contrast scanningfrom not being performed when photographing scenes are changed under acondition where focus detection is impossible even if low contrastscanning is performed once or when focus detection is impossible.

FIGS. 56 and 57 show a variation of the integration control subroutineof FIG. 24.

Step #1349 is inserted before step #1350. Steps #1355-1 to #1355-4 and#1355-6 to #1355-10 are inserted after step #1355. Step #1362 isinserted after step #1360.

At step #1349, an auxiliary light emission flag ALEF is reset to 0.

When the auxiliary light mode is ON (ALMF=1) at step #1355, the processproceeds to step #1355-1, where whether the eye sensing mode is ON ornot is determined.

When the eye sensing mode is not ON (EPEF≠1), the process proceeds tostep #1355-10, where whether or not focus detection is impossible evenif auxiliary light is emitted is determined.

When focus detection is impossible (LCEF=1), the process proceeds tostep #1365 without auxiliary light being emitted.

When focus detection is not impossible (LCEF=0), the process proceeds tostep #1360, where the emission of auxiliary light is controlled.

When the eye sensing mode is ON (EPF=1) at step #1355-1, the NALTrepresentative of times of focus detection in the auxiliary light modeis set to NALT+1 (steps #1355-2), and whether the NALT is 11 or not isdetermined (#1355-3).

When the NALT is 11, the NALT is set to 1 (step #1355-4), and theprocess proceeds to step #1355-6. When the NALT is not 11, skipping step#1355-4, the process proceeds to step #1355-6.

At steps #1355-2 to -4, whether it is a first-time focus detection or atenth-time focus detection after an emission of the auxiliary light isdetermined. Whether the NALT is 1 or not is determined at step #1355-6.When it is 1, the process proceeds to step #1360 to emit auxiliarylight. When the NALT is not 1, whether the NALT is 2 or not isdetermined (step #1355-7). When it is 2, the flag AGCCHF for changingthe gain has been set or not is determined (#1355-8). When it has beenset, determining that focus detection becomes possible if the gain ischanged, the process proceeds to step #1355-9. At step #1355-9, the flagAGCCHF is reset (AGCCHF=0), and the light emission is controlled (steps#1355-7 and -8).

When NALT≠2 at step #1355-7 or when the flag AGCCHF has not been set(AGCCHF≠1) at step #1355-8, the light emission control is not performedso as to increase the interval of light emission, and the processproceeds to step #1365.

At the additional step #1362, the flag ALEF showing the time whenauxiliary light is emitted is set (ALEF=1).

In the fourth embodiment, the defocus amount calculation subroutineconsists of the P flow (FIG. 30), a Qb flow (FIG. 58) , an Rc flow (FIG.59), the Sc flow (FIG. 53) and the T flow (FIG. 34). The Qb flow of FIG.58 and the Rc flow of FIG. 59 are variations of the Qa flow of FIG. 31and the Rb flow of FIG. 49, respectively.

In the Qb flow of FIG. 58, when none of the flags LCF1 to LCF4 showingthat focus detection is impossible is 1 at step #1650, the processproceeds to additional step #1651, where whether the auxiliary light hasbeen emitted or not is determined.

When no auxiliary light has been emitted (ALEF=0), the flag ALMF isreset in order to reset the auxiliary light mode (ALMF=0, step #1652).Then, the process proceeds to step #1655.

This is for resetting the auxiliary light mode in a case where focusdetection becomes possible without auxiliary light being emitted whenboth the eye sensing mode and the auxiliary light mode are ON. When theALEF has been set (ALEF=1) at step #1651, the process proceeds directlyto step #1655.

In the Rc flow of FIG. 59, steps #1752-1 to #1752-5 are inserted afterstep #1752, and step #1762 is inserted after step #1760.

First, when it is determined that the auxiliary light mode is not ON atstep #1752, the process proceeds to step 1752-1, where whether lowcontrast scanning is completed or not is determined.

When it is not completed (LCEF≠1), the process proceeds to step #1755.When it is completed (LCEF=1), the process proceeds to step #1752-2,where whether or not the flag EPF showing the eye sensing mode has beenset is determined.

When the flag EPF has not been set (EPF≠1), the process returns. Whenthe eye sensing mode is ON (EPF=1), whether or not two seconds havepassed since the low contrast scanning was performed is determined (step#1752-3).

When two seconds have passed (TLC≧2 sec), the low contrast scanning flagLCSF is reset (LCSF=0, step #1752-4) so that low contrast scanning isperformed again if necessary, and the flag LCEF showing that lowcontrast scanning is completed is reset (LCEF=0, step #1752-5). Then,the process proceeds to step #1755. When two second have not passed, theprocess returns.

At the additional step #1762, the NALT representative of times of focusdetection in the auxiliary light mode is reset (NALT=0).

Tables 3 and 4 show the meanings of the flags used in theabove-described embodiments. Table 5 shows the meaning of theinterrupts. Tables 6, 7 and 8 show the meanings of the variables andreference designations.

Next, the fifth embodiment of the present invention will be describedwith reference to FIGS. 61 to 70.

FIG. 62A shows an arrangement of the fifth embodiment. FIG. 62B shows anarrangement of a taking lens of the fifth embodiment.

In the figures, a slider 211 for turning on a main switch is arranged atan appropriate position on the upper surface of a camera body 210. Thecamera is under an operable condition when the slider 211 is placed atON position, and is under an inoperable condition when the slider 211 isplaced at OFF position. The numeral 212 is a release button. Bydepressing it halfway, a photographing preparation switch S1 is turnedon to start photographing preparation operations such as photometry,exposure calculation and AF. By depressing the release button 212 allthe way down, a release switch S2 is turned on to perform an exposurecontrol operation. On the back surface of the camera body 210, a finder(not shown) is provided.

The numeral 213 is an APZ button for setting auto program zoom(hereinafter referred to as APZ). The APZ is a zooming method where, byautomatically varying a focal length according to a subject distance, asubject image is always maintained at a desired magnification which ispreviously set according to the subject distance. The numeral 214 is anASZ button for setting ASZ (auto stand-by zoom). As described above, theASZ is a zooming method where a zoom lens is previously set in thephotographing preparation operations at an initial position where adesired magnification previously set according to a subject distance isobtained. The numeral 215 is a WV button for setting wide view finder(hereinafter referred to as WV). The WV is a zooming method where thezoom lens is moved toward a wide (shorter focal length) direction by apredetermined amount in order to cause a field within a photographingrange to coincide with a wide finder frame 231 (see FIG. 63) which isslightly smaller compared to a normal field frame 230 (see FIG. 63) sothat a condition of a periphery of the photographing range cansimultaneously be confirmed through the finder. In exposure, the zoomlens is returned to an original position.

The numeral 216 is an AF/FA changeover switch for changing over betweenAF (auto focus) and FA (focus aid). The numeral 217 is an on-bodydisplay portion, consisting of liquid crystal device, for providingdisplays such as a shutter speed, an aperture value, information onvarious switches, the kind of a selected zooming method and marksshowing focus conditions. The display of the marks showing focusconditions is significant in an FA operation as well as in an AFoperation. The numeral 218 is a coupler which engages with a coupler 223of a subsequently-described taking lens 220 when the taking lens 220 isattached to the camera body 210. The coupler 218 transfers, to a lensdrive mechanism, driving force from a drive motor (not shown), of thecamera body 210, for driving a focusing lens and a zoom lens. When theFA is selected, the coupler 218 retracts toward the camera body 210 sideto release the engagement. Moreover, concerning a camera system havingdifferent drive motors for the focusing lens and the zoom lens,respectively, one of the motors may be provided in the taking lens.

The numeral 220 is an interchangeable taking lens which is designed soas to be removably attachable to the front surface of the camera body210. The numeral 221 is a zoom ring which moves the zoom lens in adirection corresponding to a rotation direction thereof at a zoom speedwhich is set in accordance with a rotation amount thereof. Moreover, thezoom ring 221 can be slightly slid toward the right in the figure. It isdesigned so that the focusing lens can be moved to perform powerfocusing when rotated by a predetermined amount under a slid conditionin a manner similar to the above.

An image lock button 222 is provided at an appropriate position on theside of the taking lens 220. By depressing it when a desired zoomposition (magnification) is obtained while the zoom lens is being moved,the desired magnification is locked. The zooming method employed forthis embodiment is one where a focal length is automatically variedaccording to a subject distance while the image lock button 222 is ON sothat a magnification of a subject is always locked.

A number of pin-shaped portions arranged on the attachment portions ofthe camera body 210 and the taking lens 220 are power supply connectionterminals and various data communication terminals. Inside of the takinglens 220, a ROM (not shown) where a maximum focal length, a minimumfocal length, a minimum F number and a conversion coefficient K forconverting a defocus amount to a lens drive amount are stored. Memorycontents of the ROM are transferred to the camera body 210 at need.

FIG. 61 is a block diagram of a circuit of the camera of the fifthembodiment.

In the figure, the numeral 201 is a focal length calculating circuit forcalculating a focal length of the zoom lens. It includes: a rotaryencoder arranged at an appropriate position in the periphery of a rotarydrive member of the zoom lens and used for detecting a rotation amountcorresponding to a movement amount of the zoom lens; and a decoder usedfor decoding an output code from the rotary encoder.

The numeral 202 is a defocus amount calculating circuit for calculating,by a phase difference detection method, a defocus amount by directing asubject image having passed through the taking lens to a distancemeasurement condenser lens and to a distance measurement device whichincludes a reference portion and a comparison portion.

FIG. 63 shows an arrangement of distance measurement areas.

A plurality of distance measurement areas, that is, four areas which area central, a left, a right and an upper central areas are providedwithin the normal field frame 230. The central, the left, the right andthe upper central distance measurement areas are designated as a secondisland 2I, a first island 1I, a third island 3I and a fourth island 4I,respectively. To each of the islands, a solid-state image sensor CCD,consisting of a pair of the reference and the comparison portions, isarranged in an array form. The subject image which has been divided intwo directions through the condenser lens is directed to the referenceand the comparison portions.

The defocus amount is decided by obtaining a phase difference betweenthe subject image directed to the reference portion and that directed tothe comparison portion. The calculation of the phase difference isperformed firstly with respect to, for example, a position where theimage shift amount is smallest, and then, is performed alternately in aplus and a minus directions where the image shift gradually increases.In this camera, a defocus amount of up to approximately ±20 mm can beobtained. A phase difference obtained when the correlation between asubject image of the reference portion and that of the comparisonportion is highest is decided as the defocus amount.

W1 is a wide area displayed when the camera is in a longitudinalposition (that is, longitudinally held). W2 is a wide area displayedwhen the camera is in a lateral position (that is, laterally held). Whenthe wide area W1 or W2 is selected, a predetermined value is selected,for focus detection, amount defocus amounts obtained with respect to theplural distance measurement islands within the area in asubsequently-described manner. Concerning the longitudinal and lateralpositions of the camera, they will be described later.

The numeral 203 is a subject distance calculating circuit forcalculating subject distance based on a defocus amount obtained by thedefocus amount calculating circuit 202. The subject distance iscalculated based on a current lens position and a defocus amount withrespect to each distance measurement island. The numeral 204 is amagnification calculating circuit for calculating a magnification basedon each subject distance and a focal length of the taking lens. Adefocus amount Df, a subject distance D and a magnification β which areobtained by the above-mentioned circuits 202, 203 and 204, respectively,are transferred to an algorithm deciding circuit 205.

Subsequently, switches will be described.

SM is a main switch for activating and deactivating the camera. The ONand OFF thereof is changed over by the slider 211.

S1 is a photographing preparation switch which is turned on by thehalfway depression of the release button 212.

S2 is a release switch which is turned on by the all-the-way-downdepression of the release button 212.

SPF is a switch for setting power focus.

SFA is a switch for setting focus aid.

SPZ is a switch for setting power zoom.

SIL is a switch for setting image lock. It is turned on when the imagelock button 222 is depressed.

SAPZ is a switch for setting the APZ. It is turned on when the APZbutton 213 is depressed.

SASZ is a switch for setting the ASZ. It is turned on when the ASZbutton 214 is depressed.

SWV is a switch for setting wide view finder. It is turned on when theWV button 215 is depressed.

STY is a switch for indicating a positional condition of the camera(that is, whether the camera is held longitudinally or laterally).

The positional condition of the camera is sensed by a camera positionsensor. That is, for some subjects, it is desirable that the camera belongitudinally held in photographing; in this case, the camera's beinglongitudinally held is detected so that a subsequently-described settingof distance measurement islands can be changed to a suitable one. Forthe detection of the positional condition of the camera, for example, aT-shaped sealed tube which contains a predetermined quantity ofconductive liquid and where an electrode is formed at each terminal (atthree positions) is arranged in the camera. By identifying an electrode,of the T-shaped sealed tube, which shorts with a common electrodeaccording to an inclination condition of the camera, the camera positionsensor detects a lateral position of the camera and two kinds oflongitudinal positions of the camera. Moreover, various types of cameraposition sensors may be employed where inclination conditions of thecamera are detected by use of the working of gravity.

The algorithm deciding circuit 205 is designed so that a calculationalgorithm for focusing is set based on the above-mentioned informationand subsequently-described conditions of switches. The algorithmdeciding circuit 205 includes: an algorithm determining circuit fordetermining which of a 2I priority algorithm and a multi algorithm is tobe used; a circuit portion (see FIG. 64) for deciding which algorithmshould be used when it is determined that the multi algorithm is to beused; and a storing circuit where each calculation algorithm is stored.

The numeral 206 is a correlation range deciding circuit for deciding acorrelation range in the previously-described subject image correlationprocess of the reference and the comparison portions. The time requiredfor the correlation process can be reduced by decreasing the correlationrange. Thereby, the speed of a photographing operation can be increased.

The numeral 207 is a focusing mechanism for directing the taking lens toan in-focus position based on the obtained defocus amount.

FIG. 64 is a block diagram of the circuit portion, for deciding a multialgorithm, of the algorithm deciding circuit 205.

The numeral 251 is a preprocess circuit for forming asubsequently-described predetermined data based on an input data. Thenumeral 252 is a fuzzy circuit portion, provided withsubsequently-described membership functions shown in FIG. 67 andsubsequently-described rules shown in FIG. 68, for outputting asuitableness of each calculation algorithm based on an input data. Thenumeral 253 is a method (for example, a MAX method) of selecting acalculation algorithm of highest suitablehess based on the suitableness,of each calculation algorithm, obtained by the fuzzy circuit portion252.

Concerning data inputted to the preprocess circuit 251, Dfl to Df4 aredefocus amounts obtained with respect to the islands 1I to 4I,respectively; Dfspot is a defocus amount obtained by use of a part(hereinafter referred to as spot island) of distance measurement devicesarranged in the central portion of the second island 2I; DVCNT is acount value indicating a lens position; and DV∞ value is a lens movementamount per one count value. The lens position is decided based on bothDVCNT and DV∞.

The preprocess circuit 251 outputs the following data; β_(NEAR) is amagnification of a nearest subject; β₂ is a magnification of a subjectin the second island; β_(SPOT) is a magnification of a subject in thespot island; |Dfspot-Df2| is a difference of the defocus amount of thespot island and that of the island 2I; and |Df2-Dfupper| and |D2-Dupper|are a difference of defocus amounts and that of subject distances,respectively. "Upper" of the Dfupper and Dupper indicates the fourthisland 4I when the camera is in a lateral position, the first island 1Iwhen it is in a longitudinal position where the first island is arrangedin the upper, and the third island 3I when it is in another longitudinalposition where the third island 3I is arranged in the upper. Moreover, apattern signal is one relating to subject positional relations shown inthe second row of FIG. 68.

The fuzzy circuit portion 252 outputs the suitableness of eachcalculation algorithm. As the calculation algorithm, a nearest islandpriority ALG (algorithm), a central island priority ALG, 2I priority ALGand a spot priority ALG are employed.

A method of deciding a calculation algorithm will hereinafter bedescribed.

First, in accordance with the kind of zooming, which of the 2I priorityalgorithm and the multi algorithm is to be used is determined.

FIG. 65 is a flow chart of a procedure for the determination.

In the flow chart, AR=1 is the 2I priority algorithm, AR=2 is the multialgorithm, and LM is a correlation range (no limit when LM=0, between -2mm and 4mm when LM=1, and between -2 mm and 2 mm when LM=2).

First, whether power focus is ON or not is determined (step S1). Whenpower focus is ON, AR=1 and LM=0 are selected. When power focus is notON, whether focus aid FA is ON or not is subsequently determined (stepS2). When focus aid FA is ON, AR=1 and LM=0 are selected similarly tothe above case. When focus aid FA is not ON, whether power zoom is ON ornot is subsequently determined (step S3). When power zoom is ON, whetherthe release switch S2 is ON or not is determined (step S4). When therelease switch S2 is not ON, AR=2 and LM=0 are selected. On the otherhand, when the release switch S2 is turned on while power zoom is ON,AR=2 and LM=1 are selected.

When power zoom is not ON, whether image lock is ON or not, whether APZis ON or not and whether ASZ is ON or not are subsequently determined(steps S5 to S7). When any of the above is ON, the process proceeds tostep S8, where the condition of the release switch S2 is determined.When the release switch S2 is not ON, AR=1 and LM=0 are selected. Whenthe release switch S2 is ON, AR=1 and LM=1 are selected. When none ofthe above is ON at steps S5 to S7, whether wide view finder WV is ON ornot is subsequently determined (step S9). When WV is not ON, AR=2 andLM=0 are selected. When WV is ON, whether or not the current distancemeasurement is a first-time distance measurement after the turning on ofthe photographing preparation switch S1 is subsequently determined(S10). When it is a first-time distance measurement after the turning onof the photographing preparation switch S1, AR=2 and LM=0 are determinedsimilarly to the above case. When it is a second- or subsequent-timedistance measurement, AR=2 and LM=2 are selected.

The above-mentioned relations are shown in Table 9.

Subsequently, a focus detection process executed in a case where the 2Ipriority algorithm is selected will be described with reference to FIG.66.

In the 21 priority algorithm, first, the presence/absence of a distancemeasurement value of the second island 2I is determined (step S11). Whena distance measurement value has been obtained with respect to thesecond island 2I, the value is employed as a distance measurement valuefor focusing (step S12). When a distance measurement value has not beenobtained with respect to the second island, that is, when reliability ofa desired level has not been obtained because of insufficient luminanceand low contrast, the presence/absence of distance measurement values ofother islands 1I, 3I and 4I (step S13) is determined. When distancemeasurement values are present with respect to at least two islands, anearest subject distance measurement value of a nearest subject isselected among them (step S14). When a distance measurement value hasbeen obtained with respect to only one island, the value is employed.When a distance measurement value has obtained with respect to none ofthe islands, it is determined that distance measurement is impossible(step S15).

Subsequently, a process executed in a case where the multi algorithm isselected will be described with reference to FIGS. 67 to 70.

FIG. 67 shows membership functions for selecting a suitable algorithmamong multi algorithms. The membership functions show a relation betweena suitabieness and a magnification, and are set so that: when themagnification β (β₂, β_(NEAR)) is high, the suitableness of a membershipfunction MF1 representative of a subsequently-described macro ALG ishigh; when the magnification β (β₂, β_(NEAR)) is medium, thesuitableness of a membership function MF2 representative of asubsequently-described quently-described central island priority ALG ishigh; and when the magnification β (β₂, β_(NEAR)) is low, thesuitableness of a membership function MF3 representative of asubsequently-described nearest island priority ALG is high.

FIG. 68 shows specific rules, for selecting an algorithm, using themembership functions.

The upper row of FIG. 68 shows a positional condition (lateral orlongitudinal) of the camera. When the camera is in a lateral position, apattern of a subject is checked. That is, a first selection ALG isselected when subjects in the first and third islands are located closeto the camera and a subject in the second island is located far, and asecond selection ALG is selected in cases of other patterns. When thecamera is in a lateral position, a third selection ALG is selectedregardless of patterns.

The first to third selection ALGs are represented by graphs whose axisof abscissas represents the second island magnification β₂ and whoseaxis of ordinates represents the nearest subject magnification β_(NEAR)(including the second island magnification β₂). In the graphs, themagnification is higher in a direction toward the origin. Moreover,since β_(NEAR) includes β₂, it never occurs that β₂ >β_(NEAR).Therefore, the region above β₂ =β_(NEAR) represented by "No Case."

Concerning the first selection ALG, the macro ALG is selected whenβ_(NEAR) ≧1/15, and otherwise, the nearest island priority ALG isselected.

Concerning the second selection ALG, the macro ALG is selected whenβ_(NEAR) ≧1/15, the central island priority ALG is selected when 1/40≦β₂<1/15 and when 1/40≦β_(NEAR) <1/15, and otherwise, the nearest islandpriority ALG is selected.

Concerning the third selection ALG, the macro ALG is selected whenβ_(NEAR) ≧1/15, the central island priority ALG is selected when 1/25≦β₂ <1/15 and when 1/25 ≦β_(NEAR) <1/15, and otherwise, the nearestisland priority ALG is selected.

FIG. 69 shows rules, for selecting the defocus amount Df, employed in acase where the macro ALG is selected, while FIG. 70 shows a rule, forselecting the defoeus amount Df, employed in a case where the centralisland priority ALG is selected.

In FIG. 69, first, a rule is selected according to whether|Dfspot-Df2|≧150 μm or not. When |Dfspot-Df2|150 μm, a first Df which isfor macro is selected. Otherwise, a second Df which is for quasi-macrois selected. The first and second Dfs are represented by graphs whoseaxis of abscissas represents the magnification β_(SPOT) and whose axisof ordinates represents the magnification β₂. In the graphs, themagnification is higher in a direction toward the origin.

Concerning the first selection Df, the spot island defocus amount Dfspotis employed when 1/15≦β_(SPOT). When 1/15≦β₂ and 1/15>β_(SPOT),determining that a subject of high magnification is present not in thespot island and but in the second island, a second island defocus amountDf2 is employed. When β₂ <1/15, since there is a possibility that asubject of high magnification is present in another island, a nearestisland defocus amount Df_(NEAR) is employed.

Concerning the second selection Df, since the difference between Dfspotand Df2 is small, it is unnecessary to employ the spot island defocusamount Dfspot. Therefore, similarly to the case of the first selectionDf, the second island defocus amount Df2 is employed when 1/15≦β₂, andthe nearest island defocus amount Df_(NEAR) is employed when β₂ <1/15.

In FIG. 70, the axis of abscissas represents |Df-Dupper|, while the axisof ordinates represents |Df2-Dfupper|.

When |D2-Dupper|≦0.75 m and |Df2-Dfupper|≦150 μm, an upper islanddefocus amount is employed. At this time, the upper island is specifiedaccording to the detected positional condition (lateral or longitudinal)of the camera. That is, when the camera is in a lateral position, thefourth island 4I is the upper island, while when it is in s longitudinalposition, the first or the third island 1I or 31 is the upper islandaccording to the inclination direction.

Within a range other than the above, the nearest island defocus amountof the central island is employed. That is, when the camera is in alateral position, the nearest island defocus amount Df of a centralisland consisting of the second and the fourth islands 2I and 4I isemployed, while when the camera is in a longitudinal position, thenearest island defocus amount of a central island consisting of thesecond and the first islands 2I and 1I or the nearest island defocusamount of a central island consisting of the second and the thirdislands 2I and 3I is employed according to the inclination direction ofthe camera.

When the nearest island ALG is selected, the defocus amount Df_(NEAR)obtained based on the nearest subject distance is selected among thedefocus amounts of the first to fourth islands 1I to 4I.

By the above-described methods, focus detection is performed based on adefocus amount and a correlation range which are suitable for each case.

                  TABLE 1                                                         ______________________________________                                        Rotation Number ND                                                                           Maximum Speed LDVmax                                           (Absolute Value)                                                                             TA1       TA2     TA12                                         ______________________________________                                        Less than 100   V1       4V1     2V1                                          100 or More and                                                                              2V1       8V1     4V1                                          Less than 200                                                                 200 or More    4V1       16V1    8V1                                          ______________________________________                                    

                  TABLE 2                                                         ______________________________________                                                     Remaining                                                        Rotation Number N1                                                                         Rotation Number                                                                            Drive Speed LDV                                     (Absolute Value)                                                                           Δ N    TA3    TA4   TA34                                   ______________________________________                                        40           --           V1     4V1   V1                                     Less than 100                                                                              Less than 20 V1     4V1   V1                                                  20 or More   2V1    8V1   4V1                                    100 or More  Less than 20 V1     4V1   V1                                                  20 or More and                                                                             2V1    8V1   4V1                                                 Less than 50                                                                  50 or More   4V1    16V1  8V1                                    ______________________________________                                    

                  TABLE 3                                                         ______________________________________                                        Flag Names                                                                             Meanings                                                             ______________________________________                                        LMVF     Whether AF lens is being moved or not                                         (1: being moved)                                                     EPF      Whether eye sensing mode is ON or not (1: ON)                        LEEDF    Whether lens has been moved to the most moved-                                in position or not                                                            (1: moved to the most moved-in position)                             LCSF     Whether low contrast scanning mode is ON or not                               (1: ON)                                                              FLDP     Whether or not lens moving-out mode is ON when                                low contrast scanning mode is ON (1: ON)                             S1ONF    Whether the process has passed S1ON routine or                                not (1: passed)                                                      MSF      Whether main subject determination mode is ON                                 or not (1: ON)                                                       ALMF     Whether auxiliary light mode is ON or not                                     (1: ON)                                                              ZMVF     Whether zoom lens is being moved or not                                       (1: being moved)                                                     AGCCHF   Whether AGC data has been changed (from 1/2 to                                1) or not (1: changed)                                               LCF      Whether focus detection is impossible in all                                  four detection areas or not                                                   (1: impossible in all four detection areas)                          ______________________________________                                    

                  TABLE 4                                                         ______________________________________                                        Flag Names                                                                             Meanings                                                             ______________________________________                                        S1INFF   Whether or not in-focus condition has been                                    obtained after switch S1 is turned on                                         (1: in-focus condition after S1ON)                                   INFF     Whether or not in-focus condition has been                                    obtained (1: obtained)                                               LCF1-4   Whether focus detection is impossible in re-                                  spective areas 1-4 or not (LCF1-4 correspond                                  to areas 1-4, respectively) (1: impossible)                          INFF1-4  Whether in-focus condition has been obtained                                  with respect to respective areas 1-4 or not                                   (INFF1-4 correspond to areas 1-4, respective-                                 ly) (1: obtained)                                                    LCEF     Whether or not focus detection is impossible                                  even in low contrast mode and auxiliary light                                 mode which are set when focus detection is                                    impossible (1: impossible)                                           O/C1F    Whether the process has passed S1 triggered                                   auto one-shot/continuous routine (1: passed)                         O/C2F    Whether 0.5 sec auto one-shot/continuous rou-                                 tin has been executed or not                                                  (1: executed)                                                        EP1F     Whether first-time lens drive is being                                        performed in eye sensing mode or not                                          (1: not first-time lens drive)                                       ASZF     Whether auto stand-by zoom has been performed                                 or not (1: performed)                                                ______________________________________                                    

                  TABLE 5                                                         ______________________________________                                        Interrupts   Details                                                          ______________________________________                                        SMINT        Interrupt applied by an operation of                                          main switch SM                                                   Counter Interrupt                                                                          Interrupt applied when pulse is                                               inputted from lens encoder                                       Timer Interrupt I                                                                          Interrupt applied every predetermined                                         period of time (250 msec) to perform                                          eye sensing                                                      Timer Interrupt II                                                                         Interrupt applied when pulse is not                                           inputted from encoder for a predeter-                                         mined period of time T1                                          Timer Interrupt III                                                                        Interrupt for 50 msec applied in eye                                          sensing                                                          S1INT        Interrupt applied when switch S1 or                                           grip switch SGR is turned from off to                                         on                                                               TEPINT       Interrupt where panning sensing is                                            performed every predetermined period                                          of time                                                          ______________________________________                                    

                  TABLE 6                                                         ______________________________________                                        Variables &                                                                   Designations                                                                            Meanings                                                            ______________________________________                                        ND        Drive amount of AF lens                                             NLG       Value with a high absolute value                                    N1        Driven amount of lens                                               Δ N Remaining drive amount                                              LDV       Drive speed of lens                                                 TA1,2     Maximum speed LDVmax in Table 1                                     TA3,4     Maximum speed LDV in Table 2                                        LDVmax    Maximum drive speed of lens                                         T1        Timer for detecting end position of lens                            NF        Moving-out amount (amount from the most-                                      moved-in position)                                                  TINT      Timer for interrupt where eye sensing is                                      performed every predetermined period of time                        TAF       Timer used in AF operation                                          TEP       Timer used for timer interrupt TEPINT for                                     blur sensing                                                        NAF       Number of times of focus detection                                  AFARM     1: multi-point (four areas) distance                                           measurement                                                                  2: spot (center) distance measurement                               ______________________________________                                    

                  TABLE 7                                                         ______________________________________                                        Variables &                                                                   Designations                                                                            Meanings                                                            ______________________________________                                        TAF1      Time required for integration                                       L1DF-L3DF L1DF: preceding defocus amount                                                L2DF: defocus amount preceding L1DF                                           L3DF: defocus amount preceding L2DF                                 DF1-4     Defocus amount of each area                                         KDF       Reference value for determining whether in-                                   focus condition has been obtained or not                            NLC       Number of consecutive cases where focus de-                                   tection is impossible                                               TK        Reference value compared with integration                                     time AF1 to determined whether brightness is                                  insufficient or not                                                 KLV       Reference value compared with average value                                   of CCD data to determine whether the data is                                  great enough or not                                                 DFAV      Average of current defocus amount and three                                   preceding defocus amounts                                           LDFAV     Preceding average defocus amount (DFAV)                             DFB       Average defocus amount after in-focus condi-                                  tion is obtained under S1ON condition                               f         Focal length                                                        N         AF lens drive amount obtained by calculation                        KN        Coefficient for converting defocus amount to                                  lens drive amount                                                   D         Distance to a subject                                               ______________________________________                                    

                  TABLE 8                                                         ______________________________________                                        Variables &                                                                   Designations                                                                            Meanings                                                            ______________________________________                                        β    Magnification                                                       Δ DF                                                                              Difference between defocus amounts                                  PANM1-3   1: it is detected that panning has occurred                                   2: it is detected that panning has not                                         ocurred                                                                      3: indeterminate                                                    LPAN1, 2  Previous panning modes are stored                                   C(t)      Photometry value contrast                                           Δ B(t)                                                                            Standard value                                                      KCT       Predetermined value for determining reliabil-                                 ity of contrast C(t)                                                KB14      Predetermined value for determining reliabil-                                 ity of brightness                                                   V         Subject speed (moving subject speed)                                LV1-9     Preceding nine subject speeds (moving subject                                 speeds)                                                             AFM1-3    1: AF lock                                                                    2: indeterminate                                                              3. moving subject (continuous)                                      T3        Timer for timer interrupt III                                       TLC       Time after low contrast scanning                                    NALT      Number of times of focus detection in auxil-                                  iary light mode                                                     ______________________________________                                    

                  TABLE 9                                                         ______________________________________                                                                    Correlation                                       Sequence       Algorithm    Range                                             ______________________________________                                        Power Focus    2I Priority  No Limit                                          Focus Aid      Algorithm    (LM = 0)                                                         (AR = 1)                                                       Power Zoom     Multi Algorithm                                                               (AR = 2)                                                       Image Lock     2I Priority                                                    APZ            Algorithm                                                      ASZ            (AR = 1)                                                       Re-measurement when S2                                                                       Dependent on -2 mm to 4 mm                                     is ON during zooming                                                                         Previous     (LM = 1)                                                         Condition                                                      Wide View                                                                             First-time Multi Algorithm                                                                            No Limit                                              Distance   (AR = 2)     (LM = 0)                                              Measurement                                                                   Other than              -2 mm to 2 mm                                         the Above               (LM = 2)                                              Case                                                                  ______________________________________                                    

Obviously, many modifications and variations of the present inventionare possible in light of the above teachings. It is therefore to beunderstood that within the scope of the appended claims, the inventionmay be practiced other than as specifically described.

What is claimed is:
 1. A camera conaprising:a detecting device fordetecting that a user begins an image recording operation; a manualoperating member that is actuated by the user; a determining device fordetermining a position of a main subject image in an image plane; afirst controller for controlling said determining device to start adetermining operation after said detecting device detects the beginningof the image recording operation and to repeat the determining operationuntil said manual operating member is actuated; and a second controllerfor controlling a predetermined operation of the camera in accordancewith the position of the main subject image as determined by saiddetermining device.
 2. The camera according to claim 1, wherein saidsecond controller controls a zooming operation in accordance with thedetermined position of the main subject image.
 3. The camera accordingto claim 1, wherein said second controller controls a focusing operationin accordance with the determined position of the main subject image. 4.The camera according to claim 1, wherein said determining deviceincludes a device for providing focus length information for a takinglens and determines the position of the main subject image based on thefocus length information.
 5. The camera according to claim 1, whereinsaid determining device includes a device for measuring brightness of asubject and determines the position of the main subject image based onthe measured brightness.
 6. The camera according to claim 5, whereinsaid measuring device measures brightness at different areas of a fieldof view and said determining device determines the position of the mainsubject image based on brightness measured at a plurality of areas. 7.The camera according to claim 1, wherein said determining deviceincludes a device for detecting a condition of the camera relative tothe subject and determines the position of the main subject image basedon the detected camera condition.
 8. The camera according to claim 7,wherein said camera condition is photographic magnification.
 9. Thecamera according to claim 7, wherein said camera condition is a panningcondition.
 10. The camera according to claim 1, wherein a period fromthe determination of the main subject image to the predeterminedoperation of the camera is variable.
 11. The camera according to claim1, wherein said detecting device detects that the user looks in a finderand said manual operating member is a release button that is depressedto begin a shutter release operation.
 12. The camera according to claim1, wherein said position of the main subject image is a position in aplane perpendicular to an optical axis of the camera.
 13. A cameracomprising:a detecting device for detecting that a user begins an imagerecording operation; a manual operating member to be actuated by theuser; a distance measuring device or measuring distances to subjectswhose images are located at a plurality of positions in an image plane;a determining device for determining where a main subject image islocated among said plurality of positions based on the measured subjectdistances; a first controller for controlling said distance measuringdevice and said determining device to start the operation thereof aftersaid detecting device detects the beginning of an image recordingoperation and to repeat the operation until said manual operating memberis actuated; and a second controller for controlling a predeterminedoperation of the camera in accordance with the position of the mainsubject image as determined by said determining device.
 14. The cameraaccording to claim 13, wherein said second controller controls a zoomingoperation in accordance with the determined position of the main subjectimage.
 15. The camera according to claim 13, wherein said secondcontroller controls a focusing operation in accordance with thedetermined position of the main subject image.
 16. The camera accordingto claim 13, wherein said detecting device detects that the user looksin a finder and said manual operating member is a release button that isdepressed to begin a shutter release operation.
 17. A cameracomprising:a distance measuring device for measuring a distance to asubject; an estimating device for estimating a position of a mainsubject image in an image plane based on the measured subject distance;a confirming device for confirming the position of the main subjectimage estimated by said estimating device; a controller for controllinga predetermined operation of the camera in accordance with the estimatedand confirmed position of the main subject image; a detecting device fordetecting that a user begins an image recording operation; a manualoperating member to be actuated by the user; and a second controller forcontrolling said estimating device and said confirming device to conductthe estimating and confirming operation from a time when said detectingdevice detects the beginning of the image recording operation until atime when said manual operating member is actuated.
 18. The cameraaccording to claim 17, wherein said distance measuring device measuresdistances to subjects whose images are located at a plurality ofpositions in an image plane, and wherein said estimating deviceestimates the position of the main subject image based on a plurality ofmeasured subject distances.
 19. The camera according to claim 17,wherein said confirming device includes a device for providing focuslength information for a taking lens and confirms the position of themain subject image based on the focus length information.
 20. The cameraaccording to claim 17, wherein said confirming device includes a devicefor calculating photographic magnification and confirms the position ofthe main subject image based on the photographic magnification.